:root { --theme: #FF6B35; --theme-light: #FFF0E8; --bg: #f5f5f5; --card: #fff; --text: #333; --text-light: #999; --text-mid: #666; --radius: 16px; --safe-bottom: env(safe-area-inset-bottom, 0px); }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; background: var(--bg); color: var(--text); max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }
#app { padding-bottom: 80px; min-height: 100vh; }
.page { display: none; padding: 16px; padding-top: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; }
.page.active { display: block; padding-bottom: 20px; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.tag { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; }
.tag-active { background: var(--theme); color: #fff; }
.tag-default { background: #f0f0f0; color: var(--text-mid); }
.tag-theme { background: var(--theme-light); color: var(--theme); }
.btn { display: inline-block; padding: 12px 24px; border-radius: 24px; border: none; font-size: 16px; cursor: pointer; text-align: center; }
.btn-primary { background: var(--theme); color: #fff; width: 100%; }
.btn-outline { background: #fff; color: var(--theme); border: 1px solid var(--theme); width: 100%; }
.search-bar { display: flex; align-items: center; background: #fff; border-radius: 24px; padding: 10px 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 16px; }
.search-bar input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; padding: 4px; }
.search-bar .s-icon { color: var(--text-light); margin-right: 8px; }
.search-bar .s-clear { color: var(--text-light); cursor: pointer; margin-left: 4px; display: none; }
.search-bar .search-btn { background: var(--theme); color: #fff; border: none; border-radius: 16px; padding: 6px 14px; font-size: 13px; cursor: pointer; flex-shrink: 0; font-weight: 500; }
.scroll-x { display: flex; overflow-x: auto; gap: 8px; padding: 4px 0 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x .item { flex-shrink: 0; }

/* TabBar */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; background: #fff; border-top: 1px solid #eee; z-index: 100; padding-bottom: var(--safe-bottom); }
.tabbar .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; color: var(--text-light); font-size: 11px; cursor: pointer; border: none; background: none; }
.tabbar .tab.active { color: var(--theme); }
.tabbar .tab .t-icon { font-size: 22px; margin-bottom: 2px; line-height: 1; }
.tabbar.hidden { display: none; }
body.no-tabbar #app { padding-bottom: 0; }

/* Toast */
.toast-container { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 9999; pointer-events: none; }
.toast { background: rgba(0,0,0,0.75); color: #fff; padding: 12px 24px; border-radius: 8px; font-size: 14px; animation: toastIn 0.3s; }
@keyframes toastIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

/* Modal */
.modal-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; border-radius: 16px; padding: 24px; width: 300px; text-align: center; }
.modal h3 { margin-bottom: 12px; }
.modal p { color: var(--text-mid); margin-bottom: 20px; font-size: 14px; }
.modal .modal-actions { display: flex; gap: 12px; }
.modal .modal-actions button { flex: 1; }

/* Loading */
.loading { text-align: center; padding: 20px; color: var(--theme); }

/* Empty state */
.empty { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty .empty-icon { font-size: 64px; margin-bottom: 16px; }

/* Picker bottom sheet */
.picker-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 150; }
.picker-panel { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; background: #fff; border-radius: 24px 24px 0 0; max-height: 60vh; overflow-y: auto; z-index: 151; padding-bottom: 16px; }
.picker-panel .picker-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #f0f0f0; position: sticky; top: 0; background: #fff; border-radius: 24px 24px 0 0; }
.picker-panel .picker-title { font-size: 16px; font-weight: bold; }
.picker-panel .picker-close { color: var(--theme); background: none; border: none; font-size: 14px; cursor: pointer; }
.picker-item { display: flex; align-items: center; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid #f5f5f5; }
.picker-item:hover { background: #fafafa; }
.picker-item .pi-img { width: 48px; height: 48px; border-radius: 8px; background: #f0f0f0; margin-right: 12px; object-fit: cover; }
.picker-item .pi-info { flex: 1; }
.picker-item .pi-name { font-size: 14px; font-weight: 500; }
.picker-item .pi-en { font-size: 12px; color: var(--text-light); }
.picker-item .pi-check { color: var(--theme); font-size: 18px; }
