/* ==========================================================================
   바다거북스프 UI 개편 (2026-09)
   - style.css / style-enhancements.css 뒤에 로드되어 기존 규칙을 덮어쓴다.
   - 기존 JS가 참조하는 id/class 는 그대로 두고 표현만 바꾼다.
   ========================================================================== */

:root {
  --bg: #0f172a;
  --bg-soft: #111c33;
  --card: #1e293b;
  --card-2: #243044;
  --line: #334155;
  --line-soft: #273449;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --brand: #10b981;
  --brand-dark: #059669;
  --brand-2: #3b82f6;
  --accent: #8b5cf6;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
  --primary-color: var(--brand);
  --primary-dark: var(--brand-dark);
  --background-color: var(--bg);
  --card-background: var(--card);
  --border-color: var(--line);
  --text-color: var(--text);
  --text-secondary: var(--muted);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid rgba(16, 185, 129, .6); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 1000; }
.skip-link:focus { left: 8px; }

/* --------------------------------------------------------------------------
   헤더
   -------------------------------------------------------------------------- */
header, .site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 23, 42, .88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: none;
  padding: 0;
  display: block;
}
.site-header-inner, header > .site-header-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 30px; height: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.brand span em { font-style: normal; color: var(--brand); }
header nav, .site-header nav { display: block; }
header nav ul, .site-header nav ul {
  display: flex; gap: 2px; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
header nav ul::-webkit-scrollbar { display: none; }
@media (max-width: 768px) {
  header nav, .site-header nav { position: relative; }
  header nav::after, .site-header nav::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 36px; pointer-events: none; background: linear-gradient(90deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, .95)); }
  header nav ul { padding-right: 28px; }
}
header nav ul li { margin: 0; }
header nav a, .site-header nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap;
  transition: color .15s, background-color .15s;
}
header nav a::after { display: none; }
header nav a:hover, header nav a:focus-visible { color: var(--text); background: var(--card); }
header nav a[aria-current="page"] { color: var(--text); background: var(--card); box-shadow: inset 0 -2px 0 var(--brand); }
header nav a#admin-link { color: var(--warn); }
.mobile-notice-btn { display: none !important; }
.header-logo { display: none; }

@media (max-width: 768px) {
  header nav, .site-header nav { display: block; width: 100%; }
  .site-header-inner, header > .site-header-inner { flex-wrap: wrap; padding: 8px 12px 6px; min-height: 0; }
  header nav a { padding: 8px 10px; font-size: .88rem; }
}

/* --------------------------------------------------------------------------
   공통: 버튼 / 카드 / 배지
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 12px;
  font-weight: 700; font-size: .98rem; line-height: 1.2; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; box-shadow: none;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); background-image: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; box-shadow: 0 8px 20px -10px rgba(16, 185, 129, .8); }
.btn.primary:hover { background-image: linear-gradient(135deg, #34d399, var(--brand)); box-shadow: 0 12px 24px -10px rgba(16, 185, 129, .9); }
.btn.secondary { background: transparent; border-color: var(--line); color: var(--text); }
.btn.secondary:hover { background: var(--card); border-color: #475569; }
.btn.accent { background: linear-gradient(135deg, var(--accent), #7c3aed); color: #fff; box-shadow: 0 8px 20px -10px rgba(139, 92, 246, .8); }
.btn.accent:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--card); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .85rem; border-radius: 10px; }
.btn.play-small { min-height: 38px; padding: 6px 16px; border-radius: 999px; font-size: .88rem; background-image: linear-gradient(135deg, var(--accent), #7c3aed); color: #fff; }
.btn.play-small::after { content: '→'; font-size: 1rem; }
.btn:disabled { opacity: .5 !important; background: var(--card) !important; border-color: var(--line) !important; color: var(--muted) !important; cursor: not-allowed !important; transform: none !important; box-shadow: none !important; }
.btn.active { background: var(--brand) !important; border-color: var(--brand) !important; color: #fff !important; }

.difficulty-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .01em;
  border: 1px solid transparent; color: #fff;
}
.difficulty-badge.easy { background: rgba(16, 185, 129, .15); border-color: rgba(16, 185, 129, .4); color: #34d399; }
.difficulty-badge.medium { background: rgba(245, 158, 11, .15); border-color: rgba(245, 158, 11, .4); color: #fbbf24; }
.difficulty-badge.hard { background: rgba(239, 68, 68, .15); border-color: rgba(239, 68, 68, .4); color: #f87171; }
.completion-badge { background: rgba(16, 185, 129, .18); color: #34d399; padding: 2px 8px; border-radius: 999px; font-size: .74rem; }
.hashtag-tag { background: var(--card-2); border: 1px solid var(--line); color: var(--muted); padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; }

/* 문제 카드 */
.problem-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; max-width: 1100px; margin: 0 auto; }
.problem-list > * { min-width: 0; max-width: 100%; }
.problem-card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: none; min-width: 0; overflow: hidden;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.problem-card h3, .problem-card .description { overflow-wrap: anywhere; word-break: normal; }
.problem-card:hover { transform: translateY(-3px); border-color: rgba(16, 185, 129, .5); box-shadow: var(--shadow); }
.problem-card .problem-header { margin: 0; }
.problem-card h3 { font-size: 1.05rem; line-height: 1.4; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.problem-card .votes-small, .problem-card .comments-small { font-size: .78rem; color: var(--muted); font-weight: 500; white-space: nowrap; }
.problem-card .description { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.problem-card .hashtags { margin: 0; }
.problem-card .problem-footer { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.problem-card .meta { font-size: .8rem; color: var(--muted); gap: 8px; flex-wrap: wrap; }
.problem-card .meta .author { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 로딩 / 빈 상태 */
.loading { color: var(--muted); padding: 40px 0; }
.loading-spinner { width: 36px; height: 36px; border-width: 3px; }
.empty-message, .error-message { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 20px; box-shadow: none; }
.problem-list > .loading, .problem-list > .empty-message, .problem-list > .error-message { grid-column: 1 / -1; }

/* 알림 */
.notification { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); font-size: .92rem; max-width: min(340px, calc(100vw - 32px)); }
.notification.success { background: #064e3b; border-color: #10b981; }
.notification.error { background: #7f1d1d; border-color: #ef4444; }
.notification.warning { background: #78350f; border-color: #f59e0b; }
.notification.info { background: #1e3a8a; border-color: #3b82f6; }

/* --------------------------------------------------------------------------
   홈
   -------------------------------------------------------------------------- */
.home-page .hero, .static-home .hero {
  background: radial-gradient(ellipse at 50% -20%, rgba(16, 185, 129, .22), transparent 55%),
              radial-gradient(ellipse at 90% 120%, rgba(139, 92, 246, .18), transparent 55%),
              var(--bg);
  background-attachment: scroll; background-image: none;
  text-align: center; padding: 56px 20px 40px;
  background: radial-gradient(ellipse at 50% -20%, rgba(16, 185, 129, .22), transparent 55%),
              radial-gradient(ellipse at 90% 120%, rgba(139, 92, 246, .18), transparent 55%),
              var(--bg);
}
.hero .logo { margin-bottom: 6px; }
.hero .logo-img, .static-home .hero .logo-img { width: 150px; max-width: 42vw; height: auto; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .45)); animation: floatY 6s ease-in-out infinite; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.home-page h1, .static-home h1 {
  font-size: clamp(2rem, 6vw, 3rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.15; margin: 14px 0 10px;
  background: linear-gradient(90deg, #34d399, #60a5fa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.home-page .subtitle, .static-home .subtitle { color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.15rem); max-width: 620px; margin: 0 auto 26px; line-height: 1.7; }
.cta-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cta-buttons .btn { min-width: 150px; }
.hero-meta { display: flex; justify-content: center; gap: 18px; margin-top: 22px; color: var(--muted); font-size: .85rem; flex-wrap: wrap; }
.hero-meta b { color: var(--text); font-weight: 700; }

.features, .popular-problems, .faq-section { padding: 40px 20px; background: none; max-width: 1100px; margin: 0 auto; }
.features h2, .popular-problems h2, .faq-section h2 {
  font-size: clamp(1.35rem, 3.2vw, 1.8rem); font-weight: 800; margin-bottom: 20px; padding-bottom: 0; text-align: left;
  color: var(--text); background: none; -webkit-text-fill-color: currentColor; letter-spacing: -.01em;
}
.features h2::after, .popular-problems h2::after { display: none; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-head h2 { margin-bottom: 0; }
.section-head a { color: var(--brand); font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }
.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; max-width: none; }
.feature-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; box-shadow: none; height: auto; }
.feature-card::before { display: none; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(16, 185, 129, .4); }
.feature-card h3 { font-size: 1.02rem; margin-bottom: 6px; color: var(--text); }
.feature-card h3::before { display: none; }
.feature-card p { font-size: .9rem; color: var(--muted); }
.faq { margin: 0; }
.faq dt { font-weight: 700; margin-top: 16px; font-size: 1rem; }
.faq dd { margin: 6px 0 0; color: var(--muted); line-height: 1.7; }
.faq dt:first-child { margin-top: 0; }
.static-home .notice { text-align: center; color: var(--muted); padding: 20px; }

/* --------------------------------------------------------------------------
   페이지 공통 (게임 시작 / 튜토리얼 / 만들기 / 목록)
   -------------------------------------------------------------------------- */
.logo-imgn { display: none !important; }
.game-start-page, .problems-page, .tutorial-page, .create-page, .edit-page, .admin-page { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }
.tutorial-page, .create-page, .edit-page { max-width: 820px; }
.game-start-page h1, .problems-page h1, .tutorial-page h1, .create-page h1, .edit-page h1, .admin-page h1 {
  font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; letter-spacing: -.01em; text-align: left; margin: 0 0 18px; padding: 0;
  color: var(--text); background: none; -webkit-text-fill-color: currentColor;
}
.game-start-page h1::after, .tutorial-page h1::after, .create-page h1::after { display: none; }
.page-lead { color: var(--muted); margin: -8px 0 20px; line-height: 1.7; }

/* 필터 */
.filter-section {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; box-shadow: none; margin-bottom: 20px;
}
.filter-group, .sort-group { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: none; }
.filter-group label, .sort-group label { font-size: .76rem; color: var(--muted); font-weight: 600; margin: 0; }
.filter-group input, .filter-group select, .sort-group select {
  width: 100%; min-height: 42px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
}
.filter-group .btn { min-height: 42px; align-self: end; }
.filter-group:has(> .btn) { justify-content: flex-end; }

/* 튜토리얼 */
.step { padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line-soft); box-shadow: none; margin-bottom: 14px; }
.step::before { display: none; }
.step:hover { transform: none; box-shadow: none; }
.step h2 { font-size: 1.15rem; margin-bottom: 10px; }
.step h2::before { width: 32px; height: 32px; border-radius: 10px; font-size: .9rem; margin-right: 10px; box-shadow: none; }
.step p, .step ol, .step ul { font-size: .98rem; line-height: 1.75; margin-bottom: 10px; }
.step .example { padding: 14px 16px; border-radius: 12px; margin: 12px 0 0; }
.navigation-buttons { border-top: 1px solid var(--line-soft); margin-top: 20px; padding-top: 20px; justify-content: flex-end; }
.navigation-buttons .btn { flex: none; max-width: none; }

/* 만들기 폼 */
.form-container { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px; box-shadow: none; }
.form-group label { font-weight: 600; font-size: .92rem; }
.form-group input, .form-group textarea, .form-group select { border-radius: var(--radius-sm); min-height: 44px; }
.form-group .hint { font-size: .8rem; }
.form-actions { border-top: 1px solid var(--line-soft); padding-top: 16px; }

/* --------------------------------------------------------------------------
   문제 상세 (플레이)
   -------------------------------------------------------------------------- */
.play-page { display: block; max-width: 780px; margin: 0 auto; padding: 24px 16px 100px; }
.problem-detail {
  position: static; max-height: none; overflow: visible; display: block; text-align: left;
  background: none; padding: 0; box-shadow: none;
}
.problem-title {
  font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 800; text-align: left; margin: 0 0 10px; letter-spacing: -.01em; line-height: 1.3;
  background: none; -webkit-text-fill-color: currentColor; color: var(--text);
}
.problem-title::after { display: none; }
.problem-meta { gap: 8px 12px; font-size: .86rem; color: var(--muted); margin-bottom: 14px; }
.problem-meta .author strong { color: var(--text); font-weight: 600; }
.difficulty-votes { border: 1px solid var(--line-soft); }

.problem-content {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 22px 24px; margin: 0 0 14px; box-shadow: none; color: var(--text); font-weight: 400; font-size: 1.08rem; line-height: 1.85;
  white-space: pre-line;
}
.problem-content::before { height: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); animation: none; border-radius: var(--radius) var(--radius) 0 0; }
.problem-content::after { display: none; }
.problem-content p { margin: 0; }

.question-section {
  background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 20px; margin: 0 0 12px; box-shadow: none;
}
.question-section h3 { font-size: 1rem; color: var(--text); margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.question-section h3::before { content: '🤖'; }
.question-section .instruction { color: var(--muted); font-size: .86rem; margin-bottom: 12px; }
#manage-problem-btn { top: 12px !important; right: 12px !important; width: 34px !important; height: 34px !important; font-size: 14px !important; opacity: .7; }
#manage-problem-btn:hover { opacity: 1; transform: none; }
.question-form { display: flex; gap: 8px; margin-bottom: 14px; }
.question-form input { min-height: 46px; padding: 10px 14px; border-radius: 12px; font-size: 1rem; background: var(--bg); border: 1px solid var(--line); }
.question-form .btn { min-height: 46px; padding: 10px 18px; white-space: nowrap; }
.question-history { background: none; padding: 0; box-shadow: none; }
.question-history > p { color: var(--muted); font-size: .9rem; text-align: center; padding: 18px 0 6px; }
.question-item {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px 14px 12px 16px; margin-bottom: 8px;
  box-shadow: none; overflow: hidden; transition: border-color .15s;
}
.question-item::before { width: 3px; background: linear-gradient(180deg, var(--brand), var(--brand-2)); }
.question-item:hover { transform: none; box-shadow: none; border-color: var(--line); }
.question-text { font-size: .96rem; margin-bottom: 6px; color: var(--text); font-weight: 600; }
.answer-text { font-style: normal; font-size: .96rem; color: #34d399; font-weight: 600; }
.loading-container { padding: 6px 0 12px; }
.turtle-loading { box-shadow: none; }
.turtle-thinking { width: 84px; margin-bottom: 4px; }
.turtle-loading p { color: var(--muted); font-size: .88rem; }

#clear-questions-btn { display: none; margin: 0 0 12px; min-height: 36px; padding: 6px 12px; font-size: .84rem; border-radius: 10px; background: transparent; border: 1px dashed var(--line); color: var(--muted); box-shadow: none; }
#clear-questions-btn:hover { color: var(--text); border-color: var(--line); background: var(--card); transform: none; }
.answer-button-container { margin: 10px 0 12px; }
.answer-toggle#toggle-answer {
  width: 100%; min-height: 50px; font-size: 1rem; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #7c3aed); border: none; color: #fff; box-shadow: 0 10px 24px -12px rgba(139, 92, 246, .9);
}
.answer-toggle#toggle-answer:hover { transform: translateY(-1px); filter: brightness(1.06); }
.answer-toggle#toggle-answer.active, .answer-toggle#toggle-answer[aria-expanded="true"] { background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.answer-section { background: var(--card); border: 1px solid rgba(251, 191, 36, .35); border-radius: var(--radius); padding: 22px 24px; margin: 0 0 12px; box-shadow: none; white-space: pre-line; }
.answer-section:hover { transform: none; box-shadow: none; }
.answer-section::before { height: 3px; animation: none; border-radius: var(--radius) var(--radius) 0 0; }
.answer-section h3 { font-size: 1rem; margin-bottom: 10px; padding-bottom: 8px; }
.answer-section h3::after { width: 40px; height: 2px; }
.answer-section p { font-size: 1.02rem; color: #fde68a; font-weight: 400; margin: 0; }
.answer-actions .btn.danger { background: transparent !important; border: 1px solid rgba(239, 68, 68, .5) !important; color: #f87171 !important; min-height: 36px; padding: 6px 12px !important; font-size: .84rem !important; }
.engagement-bar { display: flex; gap: 8px; margin-top: 0 !important; flex-wrap: wrap; }
.engagement-bar .btn { flex: 1 1 140px !important; }
.difficulty-vote-section { margin-top: 10px !important; }
.difficulty-vote-section .btn { width: 100%; }
.password-modal-content { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); }
.password-modal-content h3 { color: var(--text); }
.password-modal-content input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; }
.admin-controls { margin: 0; }
.admin-buttons { margin: 0 0 12px; }

/* 모달 */
.modal-content { border-radius: var(--radius); border: 1px solid var(--line); padding: 20px; }
.modal-header { margin-bottom: 14px; padding-bottom: 12px; }
.modal-header h2 { font-size: 1.1rem; }
.modal-close { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }

/* 푸터 */
footer, .site-footer { background: transparent; border-top: 1px solid var(--line-soft); margin-top: 30px; padding: 20px 16px 30px; box-shadow: none; }
.site-footer .footer-content p { color: var(--muted); font-size: .82rem; }
.site-footer .footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; font-size: .82rem; }
.site-footer .footer-links a { color: var(--muted); text-decoration: none; }
.site-footer .footer-links a:hover { color: var(--text); }

/* 반응형 보정 */
@media (max-width: 768px) {
  .cta-buttons { flex-direction: row; }
  .cta-buttons .btn { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .hero { padding: 40px 16px 30px; }
  .features, .popular-problems, .faq-section { padding: 26px 16px; }
  .problem-list { grid-template-columns: 1fr; gap: 12px; }
  .filter-section { grid-template-columns: 1fr 1fr; }
  .filter-group:has(#search-filter), .filter-group:has(#apply-filter) { grid-column: 1 / -1; }
  .play-page { padding: 16px 12px 110px; }
  .problem-content, .answer-section { padding: 16px 18px; }
  .question-section { padding: 14px; }
  .question-form { flex-direction: row; }
  .question-form .btn { padding: 10px 14px; }
  .engagement-bar .btn { flex: 1 1 100% !important; }
}
@media (max-width: 480px) {
  .cta-buttons .btn { flex-basis: 100%; }
  .filter-section { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* 안드로이드 앱 안에서는 웹 광고 영역을 완전히 숨긴다 (앱은 애드몹만 사용) */
.in-app .ad-container, .in-app .kakao_ad_area, .in-app ins.adsbygoogle, .in-app [id^="google_ads"], .in-app iframe[src*="daumcdn"], .in-app iframe[src*="googlesyndication"] { display: none !important; }
