.mobile-nav { display: none; }

@media (max-width: 768px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); overflow-x: hidden; }
  .wrap { width: calc(100% - 28px); }
  .topbar { height: 60px; padding: 0 14px; gap: 8px; }
  .topbar > .brand { min-width: 0; font-size: 15px; }
  .topbar > .brand .brand-mark { width: 30px; height: 30px; flex: 0 0 30px; }
  .topbar > .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .header-actions { gap: 6px; }
  .points-pill { padding: 6px 9px; font-size: 12px; white-space: nowrap; }
  .avatar-btn { padding: 0; }
  .avatar-btn > span:last-child { display: none; }
  #userLogoutBtn { padding: 5px 2px; font-size: 12px; }
  .mobile-nav { position: fixed; z-index: 80; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); box-shadow: 0 -8px 24px rgba(41,70,63,.08); backdrop-filter: blur(16px); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 11px; }
  .mobile-nav i { font-size: 19px; line-height: 1; font-style: normal; }
  .mobile-nav a.active { color: var(--green); font-weight: 700; }
  .hero { min-height: auto; padding-top: 42px; padding-bottom: 30px; }
  .hero-copy { padding-top: 0; }
  .hero h1 { margin: 12px 0 16px; font-size: 35px; letter-spacing: -1px; }
  .hero-copy > p { font-size: 14px; line-height: 1.8; }
  .hero-actions { margin: 22px 0; }
  .hero-actions .btn { flex: 1; padding: 11px 12px; }
  .hero-note { align-items: flex-start; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-bottom: 48px; }
  .quick-card { min-height: 112px; padding: 15px 13px; align-items: flex-start; }
  .quick-card strong { font-size: 17px; }
  .quick-card p { line-height: 1.45; }
  .quick-icon { font-size: 24px; }
  .tiny-btn { padding: 6px 10px; }
  .section { padding: 10px 0 58px; }
  .section-head { margin-bottom: 18px; }
  .section h2, .mission-band h2 { font-size: 25px; }
  .product-grid, .product-grid.large { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .product-img { height: 145px; font-size: 48px; }
  .product-info { padding: 13px; }
  .product-info h3 { min-height: 44px; font-size: 14px; }
  .product-info p { display: none; }
  .product-foot { align-items: flex-end; gap: 5px; }
  .price b { font-size: 17px; }
  .exchange-btn { padding: 6px 8px; font-size: 11px; white-space: nowrap; }
  .mission-band { padding: 40px 0; }
  .mission-inner { gap: 20px; }
  .mission-list { grid-template-columns: 1fr; gap: 8px; }
  .mission-list > div { padding: 14px; }
  .subpage { min-height: calc(100vh - 128px); padding-top: 30px; padding-bottom: 45px; }
  .page-title { align-items: stretch; flex-direction: column; gap: 15px; margin-bottom: 25px; }
  .page-title h1 { font-size: 34px; letter-spacing: -1px; }
  .page-title.centered { margin-bottom: 15px; }
  .balance-card { flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 16px; }
  .toolbar { gap: 12px; }
  .tabs { width: 100%; padding-bottom: 3px; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: 0 0 auto; }
  .search { display: flex; width: 100%; }
  .search input { width: 100%; }
  .lottery-layout { gap: 14px; }
  .wheel-shell { left: auto; width: 340px; height: 340px; margin: 0 auto; transform: none; }
  .wheel { width: 310px; height: 310px; border-width: 8px; }
  .wheel-labels span { width: 90px; margin-left: -45px; margin-top: -9px; font-size: 10px; line-height: 18px; transform-origin: 45px 9px; }
  .wheel-labels span:nth-child(1) { transform: rotate(30deg) translateY(-100px) rotate(-30deg); }
  .wheel-labels span:nth-child(2) { transform: rotate(90deg) translateY(-100px) rotate(-90deg); }
  .wheel-labels span:nth-child(3) { transform: rotate(150deg) translateY(-100px) rotate(-150deg); }
  .wheel-labels span:nth-child(4) { transform: rotate(210deg) translateY(-100px) rotate(-210deg); }
  .wheel-labels span:nth-child(5) { transform: rotate(270deg) translateY(-100px) rotate(-270deg); }
  .wheel-labels span:nth-child(6) { transform: rotate(330deg) translateY(-100px) rotate(-330deg); }
  .spin-btn { width: 94px; height: 94px; border-width: 6px; }
  .spin-btn b { font-size: 14px; }
  .spin-btn small { font-size: 10px; }
  .wheel-pointer { top: 0; font-size: 28px; }
  .lottery-balance { padding: 20px; }
  .lottery-balance strong { font-size: 36px; }
  .panel { padding: 16px; }
  .member-hero { padding: 20px; margin-bottom: 16px; }
  .avatar.big { width: 54px; height: 54px; font-size: 20px; }
  .member-user { gap: 12px; }
  .member-user h1 { font-size: 20px; }
  .member-user p { font-size: 11px; word-break: break-all; }
  .member-balance { width: 100%; min-width: 0; flex-direction: row; align-items: center; justify-content: space-between; }
  .member-balance small { display: none; }
  .member-layout { width: 100%; min-width: 0; overflow: hidden; }
  .member-nav { max-width: 100%; min-width: 0; margin: 0; padding: 6px 0; border: 0; border-radius: 0; gap: 4px; }
  .member-nav button { flex: 0 0 auto; padding: 9px 12px; white-space: nowrap; }
  .member-content { width: 100%; min-width: 0; min-height: 360px; padding: 16px 0; border: 0; overflow: hidden; }
  .content-head { align-items: flex-start; gap: 12px; }
  .content-head h2 { font-size: 20px; }
  .content-head p { font-size: 11px; }
  #memberPanel { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .record-table { min-width: 680px; }
  .modal { padding: 12px; align-items: end; }
  .modal-card { width: 100%; max-height: 88vh; padding: 24px 18px; border-radius: 22px 22px 12px 12px; }
  .auth-card { max-width: none; }
  .detail-grid { gap: 18px; }
  .detail-img { height: 190px; font-size: 76px; }
  .detail-body h2 { font-size: 23px; }
  .detail-price { margin: 12px 0; font-size: 25px; }
  footer { padding: 30px 0 22px; }
  footer .wrap { align-items: flex-start; flex-direction: column; gap: 8px; }
  footer p { margin: 0; }
}

@media (max-width: 360px) {
  .topbar > .brand > span:last-child { max-width: 104px; }
  .points-pill { padding: 5px 7px; }
  .wheel-shell { width: 320px; height: 320px; }
  .wheel { width: 292px; height: 292px; }
  .quick-grid { grid-template-columns: 1fr; }
}
