/* ===================================
   투탑영어고대수학 랜딩페이지
   Color: Green #1a7a4a / Orange #f97316 / White
   =================================== */

:root {
  --green-dark:   #155d38;
  --green:        #1a7a4a;
  --green-mid:    #22a05a;
  --green-light:  #d1fae5;
  --green-pale:   #f0fdf4;
  --orange:       #f97316;
  --orange-dark:  #ea6a0a;
  --orange-light: #fff7ed;
  --white:        #ffffff;
  --gray-50:      #f9fafb;
  --gray-100:     #f3f4f6;
  --gray-200:     #e5e7eb;
  --gray-400:     #9ca3af;
  --gray-600:     #4b5563;
  --gray-800:     #1f2937;
  --font:         'Noto Sans KR', sans-serif;
  --radius:       12px;
  --radius-lg:    20px;
  --shadow:       0 4px 20px rgba(0,0,0,.08);
  --shadow-md:    0 8px 30px rgba(0,0,0,.12);
  --shadow-lg:    0 16px 48px rgba(0,0,0,.16);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Container ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .25s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(249,115,22,.4);
}
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(249,115,22,.5); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.7);
}
.btn-outline:hover { background: rgba(255,255,255,.15); transform: translateY(-2px); }
.btn-call {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  background: var(--orange);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(249,115,22,.35);
  transition: all .25s;
}
.btn-call:hover { background: var(--orange-dark); transform: translateY(-2px); }
.btn-submit {
  width: 100%;
  justify-content: center;
  padding: 16px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(26,122,74,.3);
  transition: all .25s;
}
.btn-submit:hover { background: var(--green-dark); transform: translateY(-2px); }

.btn-chat {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  background: #03c75a;
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  transition: all .25s;
  text-decoration: none;
}
.btn-chat:hover { background: #02a84c; color: #fff; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.3); }

/* ── Section Common ── */
.section-badge {
  display: inline-block;
  background: var(--green-light);
  color: var(--green);
  font-size: .82rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
  letter-spacing: .04em;
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--gray-800);
}
.section-title .highlight { color: var(--green); }
.section-title .highlight-white { color: var(--orange); }
.section-desc { color: var(--gray-600); font-size: 1rem; margin-bottom: 36px; }

/* ===================================
   FLOATING CTA
   =================================== */
.floating-cta {
  position: fixed;
  bottom: 28px;
  right: 20px;
  background: var(--orange);
  color: var(--white);
  border-radius: 50px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 6px 24px rgba(249,115,22,.5);
  z-index: 999;
  transition: all .25s;
  animation: float-pulse 2.5s ease-in-out infinite;
}
.floating-cta:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 10px 30px rgba(249,115,22,.6); }
@keyframes float-pulse {
  0%,100% { box-shadow: 0 6px 24px rgba(249,115,22,.5); }
  50%      { box-shadow: 0 8px 32px rgba(249,115,22,.75); }
}

/* ===================================
   HERO
   =================================== */
.hero {
  background: linear-gradient(145deg, var(--green-dark) 0%, var(--green) 50%, #28a86a 100%);
  padding: 80px 20px 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 250px; height: 250px;
  background: rgba(249,115,22,.12);
  border-radius: 50%;
}
.hero-badge {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-size: .85rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 50px;
  margin-bottom: 28px;
  animation: badge-pop .6s ease;
  position: relative;
  z-index: 1;
}
@keyframes badge-pop { from { opacity:0; transform:scale(.8); } to { opacity:1; transform:scale(1); } }

.hero-title {
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.hero-title em {
  font-style: normal;
  color: #ffd166;
  text-shadow: 0 2px 12px rgba(255,209,102,.4);
}
.hero-sub {
  color: rgba(255,255,255,.85);
  font-size: 1.1rem;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

/* countdown */
.countdown-wrap {
  background: rgba(0,0,0,.2);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: inline-block;
  margin-bottom: 36px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  position: relative;
  z-index: 1;
}
.countdown-label {
  color: rgba(255,255,255,.8);
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: .02em;
}
.countdown-boxes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cd-box {
  background: var(--white);
  border-radius: 10px;
  padding: 10px 16px;
  text-align: center;
  min-width: 62px;
}
.cd-box span {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--green);
  line-height: 1;
}
.cd-box small {
  display: block;
  font-size: .72rem;
  color: var(--gray-600);
  margin-top: 4px;
  font-weight: 600;
}
.cd-sep {
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 900;
  opacity: .7;
}

.hero-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ===================================
   PROBLEM SECTION
   =================================== */
.problem {
  padding: 80px 0;
  background: var(--gray-50);
  text-align: center;
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 16px;
}
.problem-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
  border-top: 4px solid var(--orange);
}
.problem-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.problem-icon { font-size: 2.4rem; margin-bottom: 14px; }
.problem-card h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 10px; line-height: 1.4; }
.problem-card p { color: var(--gray-600); font-size: .9rem; line-height: 1.6; }

/* ===================================
   ANALYSIS SECTION
   =================================== */
.analysis {
  padding: 80px 0;
  background: var(--white);
  text-align: center;
}

/* 학교 탭 */
.tab-wrap {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 10px 28px;
  border-radius: 50px;
  border: 2px solid var(--green);
  background: transparent;
  color: var(--green);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font);
}
.tab-btn.active, .tab-btn:hover {
  background: var(--green);
  color: var(--white);
}

/* 학년 탭 */
.grade-tab-wrap {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.grade-btn {
  padding: 8px 22px;
  border-radius: 50px;
  border: 2px solid var(--orange);
  background: transparent;
  color: var(--orange);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font);
}
.grade-btn.active, .grade-btn:hover {
  background: var(--orange);
  color: var(--white);
}

/* analysis content 카드 */
.analysis-content {
  text-align: left;
  animation: fadeIn .4s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

.ac-header {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 28px;
  color: var(--white);
}
.ac-header h3 { font-size: 1.3rem; font-weight: 900; margin-bottom: 6px; }
.ac-header .ac-meta { font-size: .88rem; opacity: .85; display: flex; gap: 16px; flex-wrap: wrap; }
.ac-meta span { background: rgba(255,255,255,.15); padding: 3px 12px; border-radius: 50px; }

.ac-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 2px solid var(--green-light);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}

.ac-panel {
  padding: 24px;
  background: var(--white);
}
.ac-panel:first-child {
  border-right: 2px solid var(--green-light);
  background: var(--green-pale);
}
.ac-panel-title {
  font-size: .82rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-light);
}
.type-item {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--green-light);
}
.type-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.type-name {
  font-weight: 800;
  font-size: .95rem;
  color: var(--gray-800);
  margin-bottom: 3px;
}
.type-detail { font-size: .83rem; color: var(--gray-600); line-height: 1.5; }

.killer-item {
  margin-bottom: 16px;
  padding: 14px;
  background: var(--gray-50);
  border-radius: 10px;
  border-left: 4px solid var(--orange);
}
.killer-item:last-child { margin-bottom: 0; }
.killer-title {
  font-weight: 800;
  font-size: .92rem;
  color: var(--orange-dark);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.killer-badge {
  font-size: .72rem;
  background: var(--orange);
  color: var(--white);
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 700;
}
.killer-desc { font-size: .83rem; color: var(--gray-600); line-height: 1.55; }

.strategy-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 4px;
}
.strategy-card {
  background: var(--green-pale);
  border: 1.5px solid var(--green-light);
  border-radius: 10px;
  padding: 12px 14px;
}
.strategy-card .sc-title {
  font-size: .8rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.strategy-card .sc-title i { font-size: .75rem; }
.strategy-card p { font-size: .78rem; color: var(--gray-600); line-height: 1.5; }

.comment-box {
  background: linear-gradient(135deg, var(--green-light), #e8fdf2);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 20px;
  border: 1.5px solid var(--green-mid);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.comment-box i { color: var(--green); font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.comment-box p { font-size: .87rem; color: var(--gray-800); line-height: 1.65; }
.comment-box strong { color: var(--green-dark); }

/* ===================================
   SOLUTION SECTION
   =================================== */
.solution {
  padding: 80px 0;
  background: var(--gray-50);
  text-align: center;
}
.solution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 16px;
  text-align: left;
}
.solution-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
  position: relative;
  border-left: 5px solid var(--green);
}
.solution-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.solution-card.highlight-card {
  border-left-color: var(--orange);
  background: linear-gradient(135deg, #fff7ed, var(--white));
}
.sol-num {
  font-size: .78rem;
  font-weight: 900;
  color: var(--green);
  letter-spacing: .1em;
  margin-bottom: 10px;
}
.highlight-card .sol-num { color: var(--orange); }
.sol-icon {
  width: 46px; height: 46px;
  background: var(--green-light);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--green);
  margin-bottom: 14px;
}
.highlight-card .sol-icon { background: var(--orange-light); color: var(--orange); }
.solution-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--gray-800);
}
.solution-card p { font-size: .88rem; color: var(--gray-600); line-height: 1.65; }

/* ===================================
   TIMELINE SECTION
   =================================== */
.timeline-section {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--green-dark) 0%, var(--green) 100%);
  text-align: center;
}
.timeline-section .section-badge {
  background: rgba(255,255,255,.2);
  color: var(--white);
}
.timeline-section .section-title { color: var(--white); }
.timeline-section .section-title .highlight { color: #ffd166; }

.timeline {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  background: rgba(255,255,255,.3);
}
.timeline-item {
  position: relative;
  width: 48%;
  margin-bottom: 36px;
}
.timeline-item.left { left: 0; text-align: right; }
.timeline-item.right { left: 52%; text-align: left; }

.tl-dot {
  position: absolute;
  top: 20px;
  width: 16px; height: 16px;
  background: var(--orange);
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 4px rgba(249,115,22,.3);
}
.timeline-item.left .tl-dot { right: -9%; }
.timeline-item.right .tl-dot { left: -9%; }

.tl-card {
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  transition: background .25s;
}
.tl-card:hover { background: rgba(255,255,255,.2); }

.tl-week {
  font-size: .75rem;
  font-weight: 800;
  color: #ffd166;
  letter-spacing: .1em;
  margin-bottom: 6px;
}
.tl-phase {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
}
.tl-card ul { padding: 0; }
.tl-card li {
  font-size: .85rem;
  color: rgba(255,255,255,.85);
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.timeline-item.left li { justify-content: flex-end; }
.tl-card li::before {
  content: '✓';
  color: #ffd166;
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
}
.timeline-item.left li::before { order: 2; }

/* ===================================
   FEATURES BANNER
   =================================== */
.features-banner {
  background: var(--green-dark);
  padding: 28px 0;
}
.features-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  color: var(--white);
  font-size: .9rem;
  font-weight: 600;
  border-right: 1px solid rgba(255,255,255,.2);
}
.feature-item:last-child { border-right: none; }
.feature-item i { color: #ffd166; font-size: 1rem; }

/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
  padding: 80px 0;
  background: linear-gradient(145deg, var(--green-dark) 0%, var(--green) 100%);
  text-align: center;
}
.contact .section-badge {
  background: rgba(255,255,255,.2);
  color: var(--white);
}
.contact .section-title { color: var(--white); }
.contact-desc { color: rgba(255,255,255,.85); font-size: 1rem; margin-bottom: 40px; }

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
  text-align: left;
}
.contact-wrap-single {
  grid-template-columns: 1fr;
  max-width: 480px;
  margin: 0 auto;
}
.contact-info-box, .contact-form-box {
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.2);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}
.contact-info-box h3, .contact-form-box h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,.9);
  font-size: .92rem;
  padding: 7px 0;
}
.contact-list li i {
  color: #ffd166;
  width: 16px;
  flex-shrink: 0;
  margin-top: 3px;
}
.contact-list a { color: rgba(255,255,255,.9); }
.contact-list a:hover { color: #ffd166; }

/* form */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: rgba(255,255,255,.8);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.1);
  color: var(--white);
  font-size: .9rem;
  font-family: var(--font);
  transition: border .2s, background .2s;
  outline: none;
  appearance: auto;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,.45); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.18);
}
.form-group select option { background: var(--green-dark); color: var(--white); }

.form-success {
  text-align: center;
  padding: 30px;
  color: var(--white);
}
.form-success i { font-size: 2.5rem; color: #ffd166; margin-bottom: 12px; display: block; }
.form-success p { font-size: 1rem; line-height: 1.6; }

/* ===================================
   FOOTER
   =================================== */
.footer {
  background: var(--gray-800);
  color: var(--gray-400);
  padding: 36px 0 24px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand strong {
  display: block;
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.footer-brand span { font-size: .85rem; }
.footer-info p { font-size: .85rem; line-height: 1.8; }
.footer-copy { font-size: .8rem; text-align: center; }

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
  .hero { padding: 60px 16px 54px; }
  .hero-title { font-size: 2rem; }
  .cd-box { min-width: 52px; padding: 8px 10px; }
  .cd-box span { font-size: 1.5rem; }

  .problem-grid { grid-template-columns: 1fr 1fr; }

  .ac-body { grid-template-columns: 1fr; }
  .ac-panel:first-child { border-right: none; border-bottom: 2px solid var(--green-light); }
  .strategy-row { grid-template-columns: 1fr; }

  .timeline::before { left: 14px; transform: none; }
  .timeline-item { width: 100%; left: 0 !important; text-align: left; padding-left: 40px; }
  .timeline-item .tl-dot { left: 6px !important; right: auto !important; }
  .tl-card li { justify-content: flex-start !important; }
  .tl-card li::before { order: 0 !important; }

  .features-grid { gap: 0; }
  .feature-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.15); width: 50%; justify-content: center; }
  .feature-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.15); }

  .contact-wrap { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; }

  .solution-grid { grid-template-columns: 1fr; }

  .hero-btns { flex-direction: column; align-items: center; }
  .hero-btns .btn { width: 100%; max-width: 320px; justify-content: center; }
}

@media (max-width: 480px) {
  .problem-grid { grid-template-columns: 1fr; }
  .feature-item { width: 100%; border-right: none !important; }
  .countdown-boxes { gap: 5px; }
  .cd-sep { font-size: 1.2rem; }
  .tab-btn { padding: 8px 18px; font-size: .88rem; }
  .grade-btn { padding: 7px 16px; font-size: .85rem; }
}

/* ===================================
   SCHOOL LINK CARDS (index.html)
   =================================== */
.school-link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 8px;
}
.school-link-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 2px solid var(--green-light);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: all .28s ease;
  position: relative;
  overflow: hidden;
}
.school-link-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 5px; height: 100%;
  background: var(--green);
  transition: width .28s ease;
}
.school-link-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}
.school-link-card:hover::before { width: 100%; opacity: .04; }
.slc-icon {
  width: 56px; height: 56px;
  background: var(--green-light);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--green);
  flex-shrink: 0;
  transition: background .28s;
}
.school-link-card:hover .slc-icon { background: var(--green); color: var(--white); }
.slc-body { flex: 1; }
.slc-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--orange);
  background: var(--orange-light);
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 7px;
  letter-spacing: .03em;
}
.slc-body h3 {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--gray-800);
  margin-bottom: 5px;
}
.slc-body p { font-size: .85rem; color: var(--gray-600); line-height: 1.5; }
.slc-arrow {
  width: 34px; height: 34px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
  font-size: .85rem;
  flex-shrink: 0;
  transition: all .28s;
}
.school-link-card:hover .slc-arrow { background: var(--green); color: var(--white); transform: translateX(4px); }

@media (max-width: 640px) {
  .school-link-grid { grid-template-columns: 1fr; }
  .school-link-card { flex-wrap: nowrap; }
}

/* ===================================
   SCHOOL PAGE COMMON (daegok / dowon)
   =================================== */

/* 상단 네비 */
.school-nav {
  background: var(--green-dark);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.school-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.snav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  font-size: .95rem;
  text-decoration: none;
}
.snav-brand i { color: #ffd166; }
.snav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.snav-link {
  padding: 7px 16px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.85);
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  border: 1.5px solid transparent;
}
.snav-link:hover, .snav-link.active { background: var(--orange); color: var(--white); border-color: var(--orange); }
.snav-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
}
.snav-back:hover { background: rgba(255,255,255,.22); color: var(--white); }

/* 학교 페이지 히어로 */
.school-hero {
  background: linear-gradient(145deg, var(--green-dark) 0%, var(--green) 60%, #28a86a 100%);
  padding: 54px 20px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.school-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 220px; height: 220px;
  background: rgba(249,115,22,.12);
  border-radius: 50%;
}
.school-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.18);
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 14px;
  letter-spacing: .04em;
}
.school-hero h1 {
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.25;
  position: relative;
  z-index: 1;
}
.school-hero h1 em { font-style: normal; color: #ffd166; }
.school-hero p {
  color: rgba(255,255,255,.8);
  font-size: .95rem;
  position: relative;
  z-index: 1;
}

/* 학년 앵커 퀵링크 */
.grade-quicknav {
  background: var(--white);
  border-bottom: 2px solid var(--green-light);
  padding: 0;
  position: sticky;
  top: 53px;
  z-index: 90;
}
.grade-quicknav .container {
  display: flex;
  gap: 0;
}
.gqn-btn {
  flex: 1;
  padding: 15px 10px;
  text-align: center;
  font-size: .9rem;
  font-weight: 700;
  color: var(--gray-600);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: all .2s;
  cursor: pointer;
}
.gqn-btn:hover { color: var(--green); border-bottom-color: var(--green); background: var(--green-pale); }
.gqn-btn.active { color: var(--green); border-bottom-color: var(--green); }

/* 학년 섹션 */
.grade-section {
  padding: 64px 0 48px;
  border-bottom: 2px solid var(--gray-100);
}
.grade-section:last-of-type { border-bottom: none; }
.grade-section:nth-child(even) { background: var(--gray-50); }

.grade-section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.grade-num-badge {
  width: 54px; height: 54px;
  background: var(--green);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--white);
  flex-shrink: 0;
}
.grade-section-header h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gray-800);
  line-height: 1.25;
}
.grade-section-header h2 small {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-400);
  margin-top: 2px;
}

/* 분석 카드 (학교 페이지용) */
.sp-analysis-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.sp-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--green-light);
  overflow: hidden;
}
.sp-card-head {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  padding: 14px 18px;
  font-size: .8rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: .05em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-card-body { padding: 16px 18px; }

.sp-type-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--green-light);
}
.sp-type-item:last-child { border-bottom: none; padding-bottom: 0; }
.sp-type-name {
  font-size: .88rem;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 2px;
}
.sp-type-cnt {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--orange);
  background: var(--orange-light);
  padding: 1px 8px;
  border-radius: 50px;
  margin-left: 4px;
}
.sp-type-detail { font-size: .8rem; color: var(--gray-600); line-height: 1.5; }

.sp-killer-item {
  padding: 12px;
  background: var(--gray-50);
  border-radius: 10px;
  border-left: 4px solid var(--orange);
  margin-bottom: 10px;
}
.sp-killer-item:last-child { margin-bottom: 0; }
.sp-killer-title {
  font-size: .85rem;
  font-weight: 800;
  color: var(--orange-dark);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sp-killer-badge {
  font-size: .68rem;
  background: var(--orange);
  color: var(--white);
  padding: 2px 7px;
  border-radius: 50px;
}
.sp-killer-desc { font-size: .8rem; color: var(--gray-600); line-height: 1.55; }

/* 전략 그리드 */
.sp-strategy-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.sp-strategy-card {
  background: var(--green-pale);
  border: 1.5px solid var(--green-light);
  border-radius: 12px;
  padding: 14px;
}
.sp-sc-title {
  font-size: .78rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sp-strategy-card p { font-size: .76rem; color: var(--gray-600); line-height: 1.5; }

/* 총평 박스 */
.sp-comment {
  background: linear-gradient(135deg, var(--green-light), #e8fdf2);
  border: 1.5px solid var(--green-mid);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 0;
}
.sp-comment i { color: var(--green); font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.sp-comment p { font-size: .87rem; color: var(--gray-800); line-height: 1.65; }

/* 메타 배지 행 */
.sp-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.sp-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 50px;
  background: var(--green-light);
  color: var(--green);
}
.sp-meta-pill.diff-low  { background: #dcfce7; color: #16a34a; }
.sp-meta-pill.diff-mid  { background: #fff7ed; color: #ea580c; }
.sp-meta-pill.diff-high { background: #fee2e2; color: #dc2626; }

/* ===================================
   PHOTO GALLERY SECTION
   =================================== */
.photo-section {
  margin-top: 28px;
}
/* photo-grid가 비어있으면 photo-section 전체 숨김 */
.photo-section:has(.photo-grid:empty) {
  display: none !important;
}
/* :has() 미지원 브라우저 대비 — photo-grid 비어있으면 숨김 */
.photo-grid:empty {
  display: none !important;
}
.photo-section.no-photos {
  display: none !important;
}
.photo-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--green-light);
}
.photo-section-head h4 {
  font-size: .95rem;
  font-weight: 800;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}
.photo-section-head h4 i { color: var(--green); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.photo-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--gray-100);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.photo-item:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }
.photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.photo-item-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: var(--white);
  font-size: .72rem;
  padding: 18px 8px 7px;
  opacity: 0;
  transition: opacity .25s;
}
.photo-item:hover .photo-item-caption { opacity: 1; }

.photo-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 32px;
  color: var(--gray-400);
  font-size: .88rem;
  border: 2px dashed var(--gray-200);
  border-radius: 12px;
}
.photo-empty i { font-size: 2rem; display: block; margin-bottom: 8px; color: var(--gray-200); }

/* 라이트박스 */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox-inner img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}
.lightbox-close {
  position: absolute;
  top: -36px; right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

/* ===================================
   ADMIN PAGE
   =================================== */
.admin-wrap {
  min-height: 100vh;
  background: var(--gray-50);
}
.admin-header {
  background: var(--green-dark);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.admin-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  font-size: .95rem;
}
.admin-logo i { color: #ffd166; }
.admin-badge {
  background: var(--orange);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
}
.admin-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 20px 60px;
}
.admin-school-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
}
.admin-school-tab {
  padding: 10px 28px;
  border-radius: 50px;
  border: 2px solid var(--green);
  background: transparent;
  color: var(--green);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font);
}
.admin-school-tab.active { background: var(--green); color: var(--white); }

.admin-grade-sections { display: none; }
.admin-grade-sections.active { display: block; }

.admin-grade-block {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--gray-200);
  margin-bottom: 24px;
  overflow: hidden;
}
.admin-grade-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  cursor: pointer;
  user-select: none;
}
.admin-grade-head h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-grade-head .toggle-icon {
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  transition: transform .25s;
}
.admin-grade-block.open .toggle-icon { transform: rotate(180deg); }
.admin-grade-body {
  padding: 24px;
  display: none;
}
.admin-grade-block.open .admin-grade-body { display: block; }

/* 업로드 박스 */
.upload-box {
  border: 2px dashed var(--green-mid);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  background: var(--green-pale);
  margin-bottom: 20px;
  position: relative;
}
.upload-box:hover { border-color: var(--green); background: var(--green-light); }
.upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-box i { font-size: 2.2rem; color: var(--green-mid); margin-bottom: 10px; display: block; }
.upload-box p { font-size: .88rem; color: var(--gray-600); margin-bottom: 4px; }
.upload-box small { font-size: .76rem; color: var(--gray-400); }

/* 캡션 입력 */
.caption-input-wrap {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.caption-input-wrap input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--gray-200);
  font-size: .88rem;
  font-family: var(--font);
  outline: none;
  min-width: 160px;
  transition: border .2s;
}
.caption-input-wrap input:focus { border-color: var(--green); }
.btn-upload-confirm {
  padding: 10px 22px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .2s;
  white-space: nowrap;
}
.btn-upload-confirm:hover { background: var(--green-dark); }
.btn-upload-confirm:disabled { opacity: .5; cursor: not-allowed; }

/* 관리 갤러리 그리드 */
.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.admin-photo-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--gray-100);
  box-shadow: var(--shadow);
}
.admin-photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.admin-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity .25s;
}
.admin-photo-item:hover .admin-photo-overlay { opacity: 1; }
.btn-delete-photo {
  background: #ef4444;
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background .2s;
}
.btn-delete-photo:hover { background: #dc2626; }
.admin-photo-caption-label {
  color: rgba(255,255,255,.85);
  font-size: .7rem;
  text-align: center;
  padding: 0 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-empty {
  text-align: center;
  padding: 28px;
  color: var(--gray-400);
  font-size: .85rem;
  border: 2px dashed var(--gray-200);
  border-radius: 12px;
}
.admin-empty i { font-size: 1.8rem; display: block; margin-bottom: 8px; }

/* 알림 토스트 */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--gray-800);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: all .3s ease;
  white-space: nowrap;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { background: var(--green); }
.toast.error   { background: #ef4444; }

/* 업로드 진행 표시 */
.upload-progress {
  height: 4px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
  display: none;
}
.upload-progress.show { display: block; }
.upload-progress-bar {
  height: 100%;
  background: var(--green);
  width: 0;
  border-radius: 4px;
  transition: width .3s ease;
}

/* 관리자 로그인 */
.admin-login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(145deg, var(--green-dark), var(--green));
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-login-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.admin-login-box i { font-size: 2.4rem; color: var(--green); margin-bottom: 12px; }
.admin-login-box h2 { font-size: 1.3rem; font-weight: 900; margin-bottom: 6px; }
.admin-login-box p { font-size: .85rem; color: var(--gray-600); margin-bottom: 24px; }
.admin-login-box input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: .95rem;
  font-family: var(--font);
  margin-bottom: 12px;
  outline: none;
  transition: border .2s;
}
.admin-login-box input:focus { border-color: var(--green); }
.btn-login {
  width: 100%;
  padding: 13px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: background .2s;
}
.btn-login:hover { background: var(--green-dark); }
.login-error {
  color: #ef4444;
  font-size: .82rem;
  margin-top: 8px;
  display: none;
}

/* ===================================
   SCHOOL PAGE RESPONSIVE
   =================================== */
@media (max-width: 768px) {
  .sp-analysis-wrap { grid-template-columns: 1fr; }
  .sp-strategy-grid { grid-template-columns: 1fr 1fr; }
  .school-hero h1 { font-size: 1.6rem; }
  .grade-quicknav .container { gap: 0; }
  .gqn-btn { font-size: .8rem; padding: 12px 8px; }
  .snav-links { gap: 5px; }
  .snav-link { padding: 5px 10px; font-size: .76rem; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .admin-photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
@media (max-width: 480px) {
  .sp-strategy-grid { grid-template-columns: 1fr; }
  .grade-section-header { flex-wrap: wrap; }
  .caption-input-wrap { flex-direction: column; }
  .admin-school-tabs { flex-direction: column; }
  .admin-school-tab { text-align: center; }
}
