/* Studyzoop public app: one mobile layout on every viewport. */
:root {
  --ink: #172b32;
  --soft-ink: #60747a;
  --line: #e0e9e7;
  --paper: #ffffff;
  --mint: #126c5c;
  --mint-dark: #0b5549;
  --blue: #337eaa;
  --sky: #edf5f2;
  --shadow: 0 10px 30px rgba(22, 55, 50, .07);
}

html { scroll-behavior: smooth; }
body {
  width: 100%;
  min-width: 0;
  background: #edf2ef;
  color: var(--ink);
  font-family: "Noto Sans KR", "Noto Sans JP", Pretendard, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle at 50% 0, #f8fbf9, #e9f0ec 68%);
  pointer-events: none;
}
body:not(.studyzoop-quiz-page) { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #f0a546;
  outline-offset: 2px;
}
.sky-shape, .loading-overlay { display: none !important; }

.country-strip, .top-nav, .mobile-menu-panel, .ad-band, .portal-shell,
.study-dashboard, .game-shell, .login-shell, .mypage-shell, .ranking-shell,
.together-shell, .policy-shell, .service-map-strip, .site-footer {
  width: min(100%, 430px);
  max-width: 430px;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
}
.country-strip {
  justify-content: flex-end;
  gap: 5px;
  min-height: 39px;
  margin-top: 0;
  padding: 5px 17px 0;
}
.country-button {
  width: 29px;
  height: 29px;
  border: 1px solid #dbe6e1;
  box-shadow: none;
}
.country-button.active { border: 2px solid var(--mint); background: #e2f3ec; }
.top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 64px;
  margin-top: 0;
  padding: 8px 17px;
  border: 0;
  border-bottom: 1px solid #dce8e2;
  border-radius: 0;
  background: rgba(250, 252, 250, .96);
  box-shadow: none;
  backdrop-filter: blur(16px);
}
.top-brand { flex: 1 1 auto; min-width: 0; }
.top-brand img { display: none; }
.top-brand::after { content: "STUDYZOOP"; color: var(--ink); font-size: 21px; font-weight: 900; letter-spacing: -.065em; }
html:lang(ko) .top-brand::after { content: "스터디줍줍"; }
.main-menu { display: none; }
.mobile-menu-button {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff url("./assets/menu-icon.svg") center / 20px 20px no-repeat;
  box-shadow: none;
}
.mobile-menu-panel {
  position: relative;
  z-index: 29;
  display: grid;
  gap: 4px;
  max-height: 0;
  margin-top: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 0 0 16px 16px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.mobile-menu-panel.open {
  max-height: min(70vh, 500px);
  margin-top: 0;
  padding: 10px 12px;
  overflow-y: auto;
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-panel a {
  display: flex;
  align-items: center;
  min-height: 45px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}
.mobile-menu-panel a.active { background: #e4f2ec; color: var(--mint); }

.mobile-bottom-nav {
  position: fixed;
  z-index: 31;
  bottom: 0;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 430px);
  min-height: calc(65px + env(safe-area-inset-bottom));
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid #d9e5df;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 -8px 26px rgba(22, 55, 50, .07);
  transform: translateX(-50%);
}
.mobile-bottom-nav a {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 52px;
  border-radius: 12px;
  color: #71837f;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}
.mobile-bottom-nav a[aria-current="page"] { background: #e6f3ed; color: var(--mint); }
.mobile-bottom-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.studyzoop-quiz-page .mobile-bottom-nav { display: none; }

.ad-band-top, .ad-slot.ad-slot-side.has-temp-ad, .ad-slot-side { display: none; }
.ad-band:has(ins[data-ad-slot$="_AD_SLOT_ID"]) { display: none; }
.ad-band-bottom { margin-top: 8px; margin-bottom: 18px; padding: 0 14px; }
.ad-slot { min-height: 60px; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }

.portal-shell, .login-shell, .mypage-shell, .ranking-shell, .together-shell,
.study-dashboard { margin-top: 0; margin-bottom: 0; padding: 15px 14px 26px; }
.portal-shell { gap: 14px; }
.portal-hero, .portal-section, .login-card, .login-benefits,
.hero-panel, .profile-panel, .mission-panel, .ranking-panel, .ranking-hero,
.mypage-hero, .mypage-card, .mypage-panel, .together-hero,
.composer-card, .timeline-section, .together-panel, .policy-shell {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.portal-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 17px;
  padding: 24px 20px 19px;
  border: 0;
  background: linear-gradient(155deg, #164e48, #102f35);
  color: white;
}
.portal-hero h1 { margin: 0; color: #fff; font-size: clamp(25px, 6.6vw, 30px); line-height: 1.28; letter-spacing: -.045em; }
.portal-hero p { margin: 12px 0 17px; color: #d8e8e3; font-size: 14px; font-weight: 500; line-height: 1.62; }
.portal-hero .mini-label { color: #9ae7c0; }
.portal-actions { display: grid; }
.portal-actions a, .hero-actions button { width: 100%; }
.primary-link, .primary-button, .start-button, .exam-card.is-live a, .global-exam-card a {
  min-height: 48px;
  border-radius: 12px;
  background: var(--mint);
  color: #fff;
  box-shadow: none;
  font-weight: 800;
}
.portal-hero .primary-link { background: #e9f7ec; color: #115447; }
.secondary-link, .ghost-button, .exam-card a { border-radius: 12px; background: #eff4f1; color: var(--ink); }
.hero-device-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 9px;
  min-height: 0;
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  background: rgba(255,255,255,.11);
}
.hero-device-card .hero-quest-banner { display: none; }
.hero-device-card strong { color: #fff; font-size: 15px; }
.hero-device-card span { grid-column: 1; color: #d7eee3; font-size: 12px; }
.hero-device-card a { grid-column: 2; grid-row: 1 / 3; align-self: center; color: #a9efc8; font-size: 13px; white-space: nowrap; }
.portal-section { padding: 20px 16px; }
.section-head { margin-bottom: 14px; }
.section-head h2 { font-size: 22px; line-height: 1.28; letter-spacing: -.03em; }
.section-head p { font-size: 13px; line-height: 1.58; }
.mini-label { margin-bottom: 4px; color: var(--mint); font-size: 11px; letter-spacing: .05em; }
.exam-grid, .global-layout, .together-preview-grid { grid-template-columns: 1fr; gap: 10px; }
.exam-card, .global-exam-card, .country-summary, .together-preview-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdfb;
  box-shadow: none;
}
.exam-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 5px 8px;
  min-height: 0;
  padding: 15px;
  text-align: left;
}
.exam-card > span { grid-column: 1; grid-row: 1; order: initial; padding: 3px 8px; background: #eef3f1; }
.exam-card.is-live > span { background: #e2f2e9; color: var(--mint); }
.exam-card .exam-icon {
  position: static;
  grid-column: 2;
  grid-row: 1 / 3;
  justify-self: end;
  align-self: center;
  order: initial;
  width: 60px;
  height: 60px;
  margin: 0;
  border: 0;
  background: #e8f3ed;
  box-shadow: none;
}
.exam-card h3 { grid-column: 1; grid-row: 2; order: initial; min-height: 0; margin: 0; font-size: 18px; line-height: 1.3; }
.exam-card p { grid-column: 1 / -1; order: initial; min-height: 0; margin: 3px 0 8px; font-size: 13px; line-height: 1.5; }
.exam-card a { grid-column: 1 / -1; order: initial; margin: 0; min-height: 42px; }
.country-summary { padding: 14px; }
.country-summary strong { font-size: 22px; }
.country-summary p { margin: 7px 0 0; font-size: 13px; }
.global-exam-card { grid-template-columns: 36px minmax(0, 1fr); padding: 11px; }
.global-exam-card > span { width: 34px; height: 34px; border-radius: 10px; }
.global-exam-card strong { font-size: 15px; }
.global-exam-card p { font-size: 12px; }
.global-exam-card a { grid-column: 1 / -1; min-height: 39px; }
.together-preview-card { padding: 14px; }
.service-map-strip { display: grid; gap: 7px; padding: 14px 17px; }
.service-map-strip nav { justify-content: flex-start; gap: 7px 12px; }
.service-map-strip a { font-size: 12px; }
.site-footer { display: grid; gap: 12px; margin-bottom: 0; padding: 20px 17px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; font-size: 11px; }
.site-footer strong { font-size: 15px; }
.site-footer p { font-size: 11px; }
.footer-links { flex-wrap: wrap; gap: 7px; }
.footer-links a { min-height: 34px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 11px; }

.study-dashboard { display: grid; grid-template-columns: 1fr; gap: 10px; padding-bottom: 4px; }
.hero-panel { min-height: 0; padding: 20px; background: #fff; }
.hero-panel h1 { font-size: 25px; line-height: 1.3; letter-spacing: -.035em; }
.hero-panel p { margin: 8px 0 15px; font-size: 13px; }
.hero-actions { display: grid; gap: 8px; }
.profile-panel { min-height: 0; padding: 11px 14px; }
.profile-panel .profile-head { gap: 10px; }
.profile-panel .profile-head h2 { margin: 0; font-size: 15px; }
.profile-panel .avatar-badge { width: 40px; height: 40px; font-size: 18px; }
.profile-panel .xp-track, .profile-panel #xpText,
.profile-panel .profile-stats, .profile-panel .badge-list { display: none; }
.mission-panel, .ranking-panel { display: none; }
.game-shell { display: grid; grid-template-columns: 1fr; gap: 11px; min-height: 0; padding: 8px 14px 25px; }
.phone-wrap { order: 1; width: 100%; gap: 8px; }
.left-stage { order: 2; position: static; display: block; }
.right-stage { order: 3; position: static; display: grid; gap: 8px; }
.character-card, .cat-panel, .phone-notch { display: none; }
.stat-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-card { padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.stat-card strong { font-size: 19px; }
.phone { width: 100%; min-height: 0; padding: 17px 16px 10px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.phone.feedback-correct, .phone.feedback-wrong { animation: none; }
.phone-top { gap: 8px; }
.round-btn { display: none; }
.phone-top { display: none; }
.studyzoop-timed-quiz .phone-top { display: flex; }
.studyzoop-timed-quiz .round-btn { display: grid; flex: 0 0 36px; width: 36px; height: 36px; }
.life-bar { height: 6px; }
.quest-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
select { min-height: 43px; padding: 0 9px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; font-size: 13px; }
.progress-line { margin-top: 14px; }
.progress-track { height: 6px; margin-bottom: 18px; }
#progressBar { background: var(--mint); }
.quiz-screen { min-height: 0; }
#questionText { min-height: 0; margin-bottom: 18px; font-size: 19px; line-height: 1.52; }
.question-type { border-radius: 8px; background: #e6f3ed; color: var(--mint); }
.answers { gap: 9px; }
.answer-button { min-height: 56px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfb; font-size: 15px; line-height: 1.48; }
.answer-button.correct { border-color: #5bb68c; background: #eaf7ef; }
.answer-button.incorrect { border-color: #e5a0a0; background: #fff0ef; }
.phone-actions { position: sticky; bottom: 0; z-index: 3; margin: 18px -16px -10px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); border-radius: 0 0 18px 18px; background: #fff; }
.phone-actions button { min-height: 46px; }
.bottom-controls { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }
.bottom-controls select { flex: 0 0 104px; }
.tabs { border: 1px solid var(--line); border-radius: 13px; box-shadow: none; }
.tab-panel { border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }
.result-modal { padding: 16px; }

.ranking-hero, .ranking-grid, .mypage-hero, .mypage-grid, .mypage-columns,
.together-hero, .together-layout, .login-shell { grid-template-columns: 1fr; }
.ranking-hero, .mypage-hero, .together-hero, .login-card, .login-benefits { padding: 18px; }
.ranking-hero h1, .mypage-hero h1, .together-hero h1, .login-card h1 { font-size: 25px; line-height: 1.28; }
.policy-shell { margin-top: 14px; padding: 20px 17px; }
.policy-shell h1 { font-size: 25px; }

@media (max-width: 350px) {
  .portal-shell, .login-shell, .mypage-shell, .ranking-shell, .together-shell,
  .study-dashboard, .game-shell { padding-left: 10px; padding-right: 10px; }
  .portal-hero h1 { font-size: 24px; }
  .top-brand img { width: 138px; }
  .country-strip { padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
