/* ============ 手机适配 ============ */ @media (max-width: 480px) { .screen-title { font-size: 28px; } .group-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .group-card { padding: 16px 8px; min-height: 96px; } /* 手机上工具栏按钮缩小 */ #toolbar { padding: 6px 4px calc(6px + var(--safe-bottom)); gap: 2px; } .tb-btn { width: 40px; height: 40px; min-width: 40px; min-height: 40px; font-size: 9px; } .tb-btn .icon { font-size: 17px; } .group-icon { font-size: 28px; } .quiz-text { font-size: 16px; padding: 16px; } .reflection-paper textarea { min-height: 160px; font-size: 14px; } .complete-btn { font-size: 14px; padding: 12px 22px; } /* 手机上显示陀螺仪按钮 */ .mobile-only { display: flex !important; } .mobile-only span:last-child { display: none; } /* 只显示图标,不显示文字 */ } /* ============ 手机抽屉(侧边目录 + 底部缩略图) ============ */ @media (max-width: 480px) { /* 默认隐藏 */ #sidebar, #thumbs { display: none !important; } /* 抽屉打开 */ body.drawer-open #sidebar { display: block !important; position: fixed; right: 0; top: 44px; bottom: 0; width: 70vw; max-width: 280px; background: rgba(0,0,0,0.85); z-index: 200; pointer-events: auto; } body.drawer-open #thumbs { display: flex !important; position: fixed; left: 0; right: 0; bottom: 50px; width: 100%; height: 80px; background: rgba(0,0,0,0.85); z-index: 200; pointer-events: auto; } /* 遮罩层:让触摸穿透到 viewer,只有 sidebar 本身接收事件 */ #drawer-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 199; pointer-events: none; /* 让触摸穿透到下方 viewer,不拦截 */ } body.drawer-open #drawer-mask { display: block; } /* 关闭按钮 */ #btn-drawer-close { display: none; position: fixed; top: 52px; right: calc(70vw + 6px); width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.25); color: #fff; font-size: 16px; align-items: center; justify-content: center; z-index: 201; cursor: pointer; border: none; } body.drawer-open #btn-drawer-close { display: flex; } }