* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { height:100%; overflow:hidden; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; background:#f2efe9; }

.dialog-main { position:fixed; top:0; left:0; right:0; bottom:0; overflow:hidden; background:#f2efe9; display:flex; flex-direction:column; }

.status-bar { flex-shrink:0; background:linear-gradient(160deg,#144d3d 0%,#1a5c4a 40%,#2d8a6e 100%); padding-top:calc(10px + env(safe-area-inset-top)); padding-right:16px; padding-bottom:10px; padding-left:16px; display:flex; align-items:center; justify-content:space-between; }
.app-title { font-size:17px; font-weight:600; color:#fff; letter-spacing:2px; }
.spacer { width:36px; height:36px; flex-shrink:0; }
.header-btn { width:36px; height:36px; border-radius:50%; background:rgba(255,255,255,0.15); display:flex; align-items:center; justify-content:center; flex-shrink:0; padding:0; margin:0; border:none; cursor:pointer; }
.header-btn-icon { font-size:18px; }

.chat-view { flex:1; overflow:hidden; display:flex; flex-direction:column; min-height:0; }
.message-list { flex:1; padding:16px 12px; overflow-y:scroll; -webkit-overflow-scrolling:auto; overscroll-behavior:contain; background:radial-gradient(ellipse at 50% 0%,rgba(26,92,74,0.03) 0%,transparent 60%),radial-gradient(ellipse at 20% 100%,rgba(200,150,62,0.04) 0%,transparent 50%),#f2efe9; }

.system-hint { display:flex; flex-direction:column; align-items:center; padding:80px 20px; }
.welcome-icon { font-size:56px; margin-bottom:20px; }
.hint-text { font-size:22px; color:#2d3a35; font-weight:700; margin-bottom:6px; letter-spacing:2px; }
.hint-subtext { font-size:14px; color:#8a9790; }

.message-item { display:flex; gap:8px; margin-bottom:16px; align-items:flex-start; }
.message-item.user { flex-direction:row-reverse; }
.message-avatar { width:32px; height:32px; border-radius:50%; background:linear-gradient(135deg,#1a5c4a 0%,#2d8a6e 100%); display:flex; align-items:center; justify-content:center; flex-shrink:0; box-shadow:0 1px 4px rgba(26,92,74,0.12); margin-top:2px; }
.message-avatar.user-avatar { background:linear-gradient(135deg,#2d8a6e 0%,#3da87d 100%); box-shadow:0 1px 4px rgba(26,92,74,0.15); }
.avatar-icon { color:#fff; font-size:14px; font-weight:700; }
.message-content { flex:1; max-width:78%; display:flex; flex-direction:column; }
.message-item.user .message-content { align-items:flex-end; }
.message-bubble { background:#fff; padding:10px 14px; border-radius:4px 16px 16px 16px; box-shadow:0 1px 4px rgba(0,0,0,0.08); border:1px solid rgba(0,0,0,0.04); word-break:break-word; line-height:1.6; }
.message-item.user .message-bubble { background:linear-gradient(135deg,#1a5c4a 0%,#2d8a6e 100%); color:#fff; border-radius:16px 4px 16px 16px; box-shadow:0 1px 4px rgba(26,92,74,0.15); }
.message-text { font-size:15px; line-height:1.6; white-space:pre-wrap; color:#1a2e25; }
.message-item.user .message-text { color:#fff; }
.message-image { width:100%; max-width:280px; margin:0 0 8px 0; border-radius:10px; display:block; }
.message-time { font-size:11px; color:#8a9790; margin-top:4px; }
.message-item.user .message-time { text-align:right; }

.input-area { background:#fff; padding:10px 12px; padding-bottom:calc(14px + env(safe-area-inset-bottom)); flex-shrink:0; display:flex; align-items:center; gap:10px; box-shadow:0 -2px 16px rgba(0,0,0,0.04); }
.icon-btn { width:36px; height:36px; border-radius:50%; background:#f0f0f0; display:flex; align-items:center; justify-content:center; flex-shrink:0; padding:0; margin:0; border:none; cursor:pointer; }
.camera-btn { background:linear-gradient(135deg,#1a5c4a 0%,#2d8a6e 100%); box-shadow:0 2px 8px rgba(26,92,74,0.2); }
.mode-btn { background:linear-gradient(135deg,#c8963e 0%,#d4a574 100%); box-shadow:0 2px 8px rgba(200,150,62,0.2); }
.tool-icon { font-size:18px; }
.text-input { flex:1; min-width:0; width:0; height:38px; background:#f2efe9; border-radius:19px; padding:0 14px; font-size:14px; color:#2d3a35; border:none; outline:none; }
.send-btn { height:38px; padding:0 18px; background:linear-gradient(135deg,#1a5c4a 0%,#2d8a6e 100%); color:#fff; border-radius:19px; font-size:14px; font-weight:500; display:flex; align-items:center; justify-content:center; flex-shrink:0; cursor:pointer; border:none; box-shadow:0 2px 8px rgba(26,92,74,0.2); transition:opacity 0.15s; }
.send-btn.disabled { background:#d0d5d2; color:#a0a8a3; box-shadow:none; }

.tab-bar { flex-shrink:0; background:rgba(255,255,255,0.92); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); display:flex; justify-content:space-around; align-items:center; padding:6px 0; padding-bottom:calc(8px + env(safe-area-inset-bottom)); box-shadow:0 -2px 20px rgba(0,0,0,0.04); }
.tab-item { display:flex; flex-direction:column; align-items:center; gap:2px; padding:6px 20px; border-radius:16px; cursor:pointer; }
.tab-item.active { background:#e6f2ed; }
.tab-icon { font-size:18px; color:#a0a8a3; }
.tab-item.active .tab-icon { color:#1a5c4a; }
.tab-label { font-size:10px; color:#a0a8a3; font-weight:500; }
.tab-item.active .tab-label { color:#1a5c4a; }

.books-view { flex:1; overflow:hidden; display:flex; flex-direction:column; background:#f2efe9; min-height:0; }
.books-header { background:linear-gradient(160deg,#144d3d 0%,#1a5c4a 50%,#2d8a6e 100%); padding-top:calc(18px + env(safe-area-inset-top)); padding-right:16px; padding-bottom:18px; padding-left:16px; }
.books-title { font-size:18px; font-weight:700; color:#fff; display:block; }
.books-subtitle { font-size:12px; color:rgba(255,255,255,0.7); margin-top:4px; display:block; }
.books-grid { flex:1; padding:12px; overflow-y:scroll; overscroll-behavior:contain; }
.book-loading,.book-empty { display:flex; align-items:center; justify-content:center; padding:60px 16px; }
.loading-text,.empty-text { font-size:14px; color:#8a9790; }
.book-locked { display:flex; flex-direction:column; align-items:center; padding:24px 20px 24px; }
.book-locked-banner { width:100%; background:linear-gradient(135deg,#f8f5ef 0%,#f2efe9 100%); border:1px solid rgba(200,150,62,0.2); border-radius:12px; padding:16px; display:flex; align-items:center; gap:14px; margin-bottom:20px; }
.book-locked-banner-icon { width:36px; height:36px; border-radius:50%; background:linear-gradient(135deg,#c8963e,#d4a574); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.book-locked-banner-text { flex:1; }
.book-locked-banner-title { font-size:15px; font-weight:700; color:#2d3a35; margin-bottom:4px; }
.book-locked-banner-desc { font-size:12px; color:#8a9790; line-height:1.4; }
.book-locked-preview { width:100%; display:flex; flex-direction:column; gap:10px; margin-bottom:24px; }
.book-preview-card { display:flex; align-items:center; gap:12px; background:#fff; border-radius:12px; padding:14px; box-shadow:0 2px 8px rgba(0,0,0,0.06); position:relative; }
.book-preview-cover { width:40px; height:56px; border-radius:3px; flex-shrink:0; display:flex; flex-direction:column; align-items:center; justify-content:center; box-shadow:1px 1px 3px rgba(0,0,0,0.12); }
.book-preview-cover.c1 { background:linear-gradient(150deg,#1a5c4a 0%,#2d8a6e 100%); }
.book-preview-cover.c2 { background:linear-gradient(150deg,#144d3d 0%,#1a5c4a 100%); }
.book-preview-cover.c3 { background:linear-gradient(150deg,#0d3b2e 0%,#144d3d 100%); }
.book-preview-cover-text { color:#fff; font-size:8px; font-weight:700; letter-spacing:1px; z-index:1; }
.book-preview-cover-sub { color:rgba(255,255,255,0.7); font-size:6px; margin-top:1px; z-index:1; }
.book-preview-info { flex:1; min-width:0; }
.book-preview-name { font-size:14px; color:#2d3a35; font-weight:600; display:block; }
.book-preview-chapters { font-size:11px; color:#8a9790; margin-top:2px; display:block; }
.book-preview-lock { position:absolute; top:8px; right:8px; width:24px; height:24px; border-radius:50%; background:rgba(200,150,62,0.15); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.book-preview-lock svg { width:12px; height:12px; }
.book-locked-btn { width:100%; padding:14px; background:linear-gradient(135deg,#1a5c4a,#2d8a6e); color:#fff; font-size:16px; font-weight:600; border:none; border-radius:12px; cursor:pointer; }
.book-locked-btn:active { transform:scale(0.97); opacity:0.9; }
.book-list { display:flex; flex-direction:column; gap:10px; }
.book-card { display:flex; align-items:center; gap:12px; background:#fff; border-radius:12px; padding:14px; box-shadow:0 2px 12px rgba(0,0,0,0.05); cursor:pointer; }
.book-card:active { transform:scale(0.985); background:#fafaf8; }
.book-cover { width:52px; height:72px; border-radius:3px; display:flex; flex-direction:column; align-items:center; justify-content:center; flex-shrink:0; position:relative; overflow:hidden; box-shadow:2px 2px 6px rgba(0,0,0,0.15); }
.book-cover.c1 { background:linear-gradient(160deg,#1a5c4a 0%,#2d8a6e 40%,#3da87d 100%); }
.book-cover.c2 { background:linear-gradient(160deg,#144d3d 0%,#1a5c4a 40%,#2d8a6e 100%); }
.book-cover.c3 { background:linear-gradient(160deg,#0d3b2e 0%,#144d3d 40%,#1a5c4a 100%); }
.book-cover::before { content:""; position:absolute; top:0; left:5px; width:1px; height:100%; background:rgba(255,255,255,0.12); }
.book-cover-deco { position:absolute; top:8px; left:50%; transform:translateX(-50%); width:20px; height:1px; background:rgba(255,255,255,0.3); }
.book-cover-deco2 { position:absolute; bottom:8px; left:50%; transform:translateX(-50%); width:20px; height:1px; background:rgba(255,255,255,0.3); }
.book-cover-title { color:#fff; font-size:10px; font-weight:700; letter-spacing:1px; text-shadow:0 1px 2px rgba(0,0,0,0.2); z-index:1; }
.book-cover-sub { color:rgba(255,255,255,0.7); font-size:7px; margin-top:2px; z-index:1; }
.book-info { flex:1; min-width:0; }
.book-name { font-size:15px; font-weight:600; color:#2d3a35; display:block; }
.book-chapters { font-size:12px; color:#8a9790; margin-top:4px; display:block; }

.reader-view { flex:1; display:flex; flex-direction:column; background:#faf9f6; min-height:0; }
.reader-header { background:#fff; padding-top:calc(10px + env(safe-area-inset-top)); padding-right:12px; padding-bottom:10px; padding-left:12px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid rgba(0,0,0,0.06); flex-shrink:0; }
.reader-back { display:flex; align-items:center; gap:2px; padding:4px 8px 4px 0; cursor:pointer; }
.back-icon { font-size:22px; color:#1a5c4a; font-weight:700; }
.back-text { font-size:13px; color:#1a5c4a; }
.reader-title { font-size:14px; font-weight:600; color:#2d3a35; flex:1; text-align:center; padding:0 8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reader-toc-btn { background:#e6f2ed; border-radius:12px; padding:5px 12px; font-size:12px; color:#1a5c4a; cursor:pointer; }
.reader-content { flex:1; padding:16px; overflow-y:scroll; overscroll-behavior:contain; overflow-x:hidden; }
.chapter-header { margin-bottom:16px; padding-bottom:12px; border-bottom:1px solid rgba(0,0,0,0.06); }
.chapter-title { font-size:18px; font-weight:700; color:#2d3a35; line-height:1.4; }
.chapter-body { line-height:1.7; overflow-x:hidden; }
.chapter-text { font-size:15px; color:#3d4a43; white-space:pre-wrap; line-height:1.75; word-break:break-word; margin-bottom:12px; }
.chapter-image { width:100%; max-width:100%; display:block; margin:12px 0; border-radius:4px; }
.ebook-section-card { margin:16px 0; padding:16px; background:#f6f8f5; border-radius:12px; border-left:4px solid #1a5c4a; }
.ebook-section-header { font-size:14px; font-weight:600; color:#1a5c4a; margin-bottom:12px; padding-bottom:8px; border-bottom:1px solid rgba(26,92,74,0.15); }
.ebook-section-paragraph { font-size:14px; color:#3d4a43; white-space:pre-wrap; line-height:1.75; word-break:break-word; margin-bottom:10px; }
.ebook-section-image { margin:10px 0; }
.ebook-section-image img { width:100%; max-width:100%; display:block; border-radius:8px; }
.shop-products-card { margin:12px 0; padding:14px; background:linear-gradient(135deg,#f0faf6 0%,#e8f5ef 100%); border-radius:12px; border:1px solid rgba(26,92,74,0.15); }
.shop-products-title { font-size:14px; font-weight:600; color:#1a5c4a; margin-bottom:10px; }
.shop-products-list { display:flex; flex-direction:column; gap:8px; }
.shop-product-item { display:flex; flex-direction:column; padding:10px 12px; background:#fff; border-radius:8px; border:1px solid rgba(26,92,74,0.1); text-decoration:none; color:inherit; transition:all .2s; }
.shop-product-item:hover { border-color:#1a5c4a; box-shadow:0 2px 8px rgba(26,92,74,0.12); }
.shop-product-type { font-size:11px; color:#2d8a6e; font-weight:600; margin-bottom:4px; }
.shop-product-name { font-size:13px; color:#2c3e2d; font-weight:500; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.shop-product-price { font-size:14px; color:#e74c3c; font-weight:700; margin-top:4px; }
.shop-product-reason { font-size:11px; color:#8a9790; margin-top:4px; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.shop-videos-card { margin:12px 0; padding:14px; background:linear-gradient(135deg,#fef8f0 0%,#fdf2e6 100%); border-radius:12px; border:1px solid rgba(230,126,34,0.15); }
.shop-videos-title { font-size:14px; font-weight:600; color:#d35400; margin-bottom:10px; }
.shop-videos-list { display:flex; flex-direction:column; gap:6px; }
.shop-video-item { display:flex; align-items:center; gap:10px; padding:8px 12px; background:#fff; border-radius:8px; border:1px solid rgba(230,126,34,0.1); text-decoration:none; color:inherit; transition:all .2s; }
.shop-video-item:hover { border-color:#e67e22; box-shadow:0 2px 8px rgba(230,126,34,0.12); }
.shop-video-icon { width:32px; height:32px; background:linear-gradient(135deg,#e67e22 0%,#f39c12 100%); border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:12px; flex-shrink:0; }
.shop-video-title { font-size:13px; color:#2c3e2d; font-weight:500; line-height:1.4; }
.chapter-nav { display:flex; align-items:center; justify-content:space-between; margin-top:28px; padding:14px 0; border-top:1px solid rgba(0,0,0,0.06); }
.nav-btn { background:linear-gradient(135deg,#1a5c4a 0%,#2d8a6e 100%); color:#fff; border-radius:16px; padding:7px 14px; font-size:12px; cursor:pointer; border:none; }
.nav-btn.disabled { background:#d0d5d2; color:#a0a8a3; cursor:default; }
.nav-chapter-index { font-size:12px; color:#8a9790; }
.reader-loading { flex:1; display:flex; align-items:center; justify-content:center; }

.toc-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.4); z-index:500; display:flex; justify-content:flex-end; }
.toc-panel { width:75%; height:100%; background:#fff; display:flex; flex-direction:column; }
.toc-header { display:flex; align-items:center; justify-content:space-between; padding:14px; border-bottom:1px solid rgba(0,0,0,0.06); flex-shrink:0; }
.toc-header-title { font-size:15px; font-weight:600; color:#2d3a35; }
.toc-header-close { font-size:22px; color:#a0a8a3; width:32px; height:32px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.toc-list { flex:1; padding:8px 0; overflow-y:auto; }
.toc-item { display:flex; align-items:center; gap:8px; padding:12px 14px; border-bottom:1px solid #f5f5f0; cursor:pointer; }
.toc-item:active { background:#f5f7f5; }
.toc-item.active { background:#e6f2ed; }
.toc-index { font-size:12px; color:#a0a8a3; width:20px; text-align:center; flex-shrink:0; }
.toc-name { font-size:13px; color:#2d3a35; flex:1; }

@keyframes spin { 0% { transform:rotate(0deg); } 100% { transform:rotate(360deg); } }
.action-btn { padding:5px 12px; background:#e6f2ed; color:#1a5c4a; border-radius:12px; font-size:12px; cursor:pointer; }
.message-item.user .action-btn { background:rgba(255,255,255,0.2); color:#fff; }

.login-view { position:fixed; top:0; left:0; right:0; bottom:0; background:linear-gradient(160deg,#144d3d 0%,#1a5c4a 40%,#2d8a6e 100%); display:flex; flex-direction:column; align-items:center; justify-content:center; z-index:1000; }
.login-content { width: 90%; max-width: 320px; display:flex; flex-direction:column; align-items:center; }
.login-logo { font-size:64px; margin-bottom:24px; }
.login-title { font-size:24px; color:#fff; font-weight:700; letter-spacing:3px; margin-bottom:8px; text-align:center; }
.login-subtitle { font-size:14px; color:rgba(255,255,255,0.7); margin-bottom:48px; text-align:center; }
.login-desc { font-size:13px; color:rgba(255,255,255,0.8); margin-bottom:20px; text-align:center; }
.order-input-wrap { width:100%; margin-bottom:12px; }
.order-input { width:100%; height:44px; background:#fff; border-radius:22px; padding:0 18px; font-size:14px; color:#2d3a35; border:none; outline:none; text-align:center; }
.login-hint { font-size:11px; color:rgba(255,255,255,0.6); margin-bottom:14px; text-align:center; }

.login-btn {
  width: 100%;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;
  margin-bottom: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.login-btn.primary {
  background: linear-gradient(135deg, #1a5c4a 0%, #2d8a6e 50%, #3da87d 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.login-btn.primary:hover {
  background: linear-gradient(135deg, #2d8a6e 0%, #3da87d 50%, #4fc08d 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(45, 138, 110, 0.4);
}

.login-btn.primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(45, 138, 110, 0.3);
}

.login-btn.secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.login-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.login-btn.secondary:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.1);
}

.order-verify-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.45); z-index:999; display:flex; align-items:center; justify-content:center; }
.order-verify-dialog { width:82%; background:#fff; border-radius:16px; padding:28px 22px; box-shadow:0 8px 32px rgba(0,0,0,0.12); }
.order-verify-title { font-size:18px; font-weight:700; text-align:center; margin-bottom:8px; color:#2d3a35; }
.order-verify-desc { font-size:13px; color:#8a9790; text-align:center; margin-bottom:20px; }
.order-verify-input { width:100%; border:1px solid #e0e3e0; border-radius:8px; padding:12px 14px; font-size:14px; margin-bottom:14px; color:#2d3a35; background:#fafaf8; box-sizing:border-box; outline:none; }
.order-verify-input:focus { border-color:#1a5c4a; }
.order-verify-hint { font-size:11px; color:#a0a8a3; text-align:center; margin-bottom:16px; line-height:1.5; }
.order-verify-btns { display:flex; gap:12px; }
.order-verify-btn { flex:1; text-align:center; padding:12px; border-radius:12px; font-size:14px; font-weight:500; cursor:pointer; }
.order-verify-btn.cancel { background:#f2f3f1; color:#8a9790; }
.order-verify-btn.confirm { background:linear-gradient(135deg,#1a5c4a 0%,#2d8a6e 100%); color:#fff; }

.privacy-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.45); z-index:1001; display:flex; align-items:center; justify-content:center; }
.privacy-dialog { width:85%; max-height:80vh; background:#fff; border-radius:16px; padding:28px 22px; display:flex; flex-direction:column; }
.privacy-title { font-size:18px; font-weight:700; text-align:center; margin-bottom:16px; color:#2d3a35; }
.privacy-content { font-size:13px; color:#5a6760; line-height:1.7; max-height:50vh; overflow-y:auto; margin-bottom:20px; white-space:pre-wrap; }
.privacy-agree-btn { width:100%; padding:14px; background:linear-gradient(135deg,#1a5c4a 0%,#2d8a6e 100%); color:#fff; border-radius:12px; font-size:15px; font-weight:500; text-align:center; cursor:pointer; border:none; }
.privacy-agree-btn:active { transform:scale(0.98); }

.modal-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.45); z-index:998; display:flex; align-items:center; justify-content:center; }
.modal-dialog { width:82%; background:#fff; border-radius:16px; padding:28px 22px; box-shadow:0 8px 32px rgba(0,0,0,0.12); }
.modal-title { font-size:17px; font-weight:700; text-align:center; margin-bottom:12px; color:#2d3a35; }
.modal-content { font-size:14px; color:#5a6760; line-height:1.6; margin-bottom:20px; white-space:pre-wrap; }
.modal-btns { display:flex; gap:12px; }
.modal-btn { flex:1; text-align:center; padding:12px; border-radius:12px; font-size:14px; font-weight:500; cursor:pointer; }
.modal-btn.cancel { background:#f2f3f1; color:#8a9790; }
.modal-btn.confirm { background:linear-gradient(135deg,#1a5c4a 0%,#2d8a6e 100%); color:#fff; }

.toast-container { position:fixed; top:60px; left:50%; transform:translateX(-50%); z-index:2000; display:flex; flex-direction:column; align-items:center; gap:8px; pointer-events:none; }
.toast-item { background:rgba(45,58,53,0.9); color:#fff; padding:10px 20px; border-radius:20px; font-size:13px; animation:toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards; pointer-events:auto; }
@keyframes toastIn { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; } }

.products-section { margin-top:20px; padding-top:16px; border-top:1px solid rgba(0,0,0,0.06); }
.products-label { font-size:13px; font-weight:600; color:#c8963e; margin-bottom:10px; display:block; }
.product-card { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid rgba(0,0,0,0.04); border-radius:10px; padding:10px; margin-bottom:8px; box-shadow:0 2px 8px rgba(0,0,0,0.04); cursor:pointer; }
.product-card:active { background:#fafaf8; }
.product-img { width:48px; height:48px; border-radius:8px; background:#f0eee8; flex-shrink:0; object-fit:cover; }
.product-info { flex:1; min-width:0; }
.product-name { font-size:13px; font-weight:500; color:#2d3a35; display:block; }
.product-price { font-size:14px; font-weight:700; color:#c8963e; margin-top:2px; display:block; }
.product-reason { font-size:11px; color:#8a9790; margin-top:2px; line-height:1.3; display:block; }
.product-arrow { font-size:18px; color:#c0c5c1; flex-shrink:0; }

.tab-icon-wrap { width:32px; height:32px; display:flex; align-items:center; justify-content:center; border-radius:50%; transition:transform 0.2s, background 0.2s; }
.tab-item.active .tab-icon-wrap { transform:scale(1.1); }

.videos-view { flex:1; overflow:hidden; display:flex; flex-direction:column; background:#f2efe9; min-height:0; }
.videos-header { background:linear-gradient(160deg,#144d3d 0%,#1a5c4a 50%,#2d8a6e 100%); padding-top:calc(18px + env(safe-area-inset-top)); padding-right:16px; padding-bottom:18px; padding-left:16px; }
.videos-title { font-size:18px; font-weight:700; color:#fff; display:block; }
.videos-subtitle { font-size:12px; color:rgba(255,255,255,0.7); margin-top:4px; display:block; }
.videos-grid { flex:1; padding:12px; overflow-y:scroll; overscroll-behavior:contain; }
.video-loading { display:flex; align-items:center; justify-content:center; padding:60px 16px; }
.video-list { display:flex; flex-direction:column; gap:10px; }
.video-card { display:flex; gap:12px; background:#fff; border-radius:12px; padding:12px; box-shadow:0 2px 12px rgba(0,0,0,0.05); cursor:pointer; }
.video-card:active { transform:scale(0.985); background:#fafaf8; }
.video-thumb { width:120px; height:80px; border-radius:8px; background:#e0e3e0; flex-shrink:0; object-fit:cover; }
.video-info { flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center; }
.video-name { font-size:14px; font-weight:500; color:#2d3a35; display:block; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.video-meta { font-size:11px; color:#a0a8a3; margin-top:6px; display:block; }
.video-duration { position:absolute; bottom:4px; right:4px; background:rgba(0,0,0,0.7); color:#fff; font-size:10px; padding:1px 5px; border-radius:3px; }
.video-thumb-wrap { position:relative; width:120px; height:80px; flex-shrink:0; }

.player-view { position:fixed; top:0; left:0; right:0; bottom:0; background:#000; display:flex; flex-direction:column; z-index:600; }
.player-header { background:rgba(0,0,0,0.8); padding-top:calc(10px + env(safe-area-inset-top)); padding-right:12px; padding-bottom:10px; padding-left:12px; display:flex; align-items:center; justify-content:space-between; flex-shrink:0; }
.player-back { display:flex; align-items:center; gap:2px; padding:4px 8px 4px 0; cursor:pointer; }
.player-back .back-icon { font-size:22px; color:#fff; font-weight:700; }
.player-back .back-text { font-size:13px; color:#fff; }
.player-title { font-size:14px; font-weight:600; color:#fff; flex:1; text-align:center; padding:0 8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.player-body { flex:1; overflow-y:auto; background:#111; }
.video-container { width:100%; background:#000; }
.video-container video { width:100%; display:block; }
.video-container .fallback-btn { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:40px; color:#fff; }
.video-container .fallback-btn span { font-size:14px; margin-bottom:12px; color:rgba(255,255,255,0.7); }
.video-container .fallback-btn button { background:linear-gradient(135deg,#1a5c4a,#2d8a6e); color:#fff; border:none; border-radius:20px; padding:10px 24px; font-size:14px; cursor:pointer; }
.video-products { padding:16px; }
.video-products-title { font-size:13px; font-weight:600; color:#c8963e; margin-bottom:10px; display:block; }
.video-product-card { display:flex; align-items:center; gap:10px; background:#1a1a1a; border-radius:10px; padding:10px; margin-bottom:8px; cursor:pointer; }
.video-product-card:active { background:#222; }
.video-product-img { width:48px; height:48px; border-radius:8px; background:#333; flex-shrink:0; object-fit:cover; }
.video-product-info { flex:1; min-width:0; }
.video-product-name { font-size:13px; font-weight:500; color:#fff; display:block; }
.video-product-price { font-size:14px; font-weight:700; color:#c8963e; margin-top:2px; display:block; }
.video-product-arrow { font-size:18px; color:#555; flex-shrink:0; }

.tools-view { flex:1; overflow-y:auto; background:#f2efe9; display:flex; flex-direction:column; }
.tools-header { background:linear-gradient(160deg,#144d3d 0%,#1a5c4a 50%,#2d8a6e 100%); padding-top:calc(12px + env(safe-area-inset-top)); padding-right:16px; padding-bottom:12px; padding-left:16px; display:flex; align-items:center; gap:10px; }
.tools-back { display:flex; align-items:center; gap:2px; padding:4px 8px 4px 0; cursor:pointer; flex-shrink:0; }
.tools-back .back-icon { color:#fff; font-size:22px; font-weight:700; }
.tools-back .back-text { color:#fff; font-size:13px; }
.tools-header-icon { font-size:22px; }
.tools-title { font-size:18px; font-weight:700; color:#fff; }
.tools-content { padding:16px; display:flex; flex-direction:column; gap:16px; padding-bottom:100px; }
.tools-section { display:flex; flex-direction:column; gap:8px; }
.tools-section-title { font-size:13px; font-weight:600; color:#8a9790; padding-left:4px; text-transform:uppercase; letter-spacing:1px; }
.tools-card { background:#fff; border-radius:12px; padding:16px; box-shadow:0 2px 12px rgba(0,0,0,0.04); display:flex; flex-direction:column; gap:10px; }
.tools-card-row { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.tools-card-label { font-size:13px; color:#8a9790; flex-shrink:0; }
.tools-card-value { font-size:14px; color:#2d3a35; font-weight:500; text-align:left; word-break:break-all; }
.tools-release-notes { font-size:12px; color:#6b7a73; font-weight:400; }
.tools-card-action { display:flex; justify-content:flex-end; padding-top:4px; }
.tools-download-btn { padding:8px 20px; border-radius:20px; font-size:14px; font-weight:500; border:none; cursor:pointer; background:#e0e5e2; color:#6b7a73; transition:all 0.15s; }
.tools-download-btn.primary { background:linear-gradient(135deg,#1a5c4a 0%,#2d8a6e 100%); color:#fff; box-shadow:0 2px 8px rgba(26,92,74,0.2); }
.tools-download-btn:disabled { opacity:0.5; cursor:not-allowed; }

.phone-input-wrap { width:100%; margin-bottom:16px; }
.phone-input { width:100%; height:48px; background:#f2efe9; border:2px solid #d0d5d2; border-radius:12px; padding:0 16px; font-size:16px; color:#2d3a35; outline:none; text-align:center; transition:border-color 0.2s; }
.phone-input:focus { border-color:#1a5c4a; }
.phone-input::placeholder { color:#b0b8b3; }
.login-divider { width:100%; display:flex; align-items:center; gap:12px; margin:16px 0; }
.login-divider::before,.login-divider::after { content:""; flex:1; height:1px; background:#d0d5d2; }
.login-divider span { font-size:12px; color:#a0a8a3; }

.entitlement-card { gap: 12px; }
.entitlement-status { display: flex; align-items: center; gap: 10px; }
.entitlement-badge { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.entitlement-badge.trial { background: #fff3e0; color: #e65100; }
.entitlement-badge.paid { background: #e6f2ed; color: #1a5c4a; }
.entitlement-badge.expired { background: #f5f5f5; color: #999; }
.entitlement-badge.whitelist { background: #fce4ec; color: #c62828; }
.entitlement-days { font-size: 14px; color: #2d3a35; font-weight: 500; }
.entitlement-detail { font-size: 12px; color: #8a9790; line-height: 1.5; }
.entitlement-perms { display: flex; flex-wrap: wrap; gap: 6px; }
.entitlement-perm-tag { display: inline-block; padding: 3px 8px; border-radius: 8px; font-size: 11px; background: #f0f5f2; color: #1a5c4a; font-weight: 500; }
.entitlement-progress { width: 100%; height: 6px; background: #f0f0ed; border-radius: 3px; margin-top: 4px; overflow: hidden; }
.entitlement-progress-bar { height: 100%; border-radius: 3px; transition: width 0.3s; }
.entitlement-progress-bar.trial { background: linear-gradient(90deg, #ff9800, #ffc107); }
.entitlement-progress-bar.paid { background: linear-gradient(90deg, #1a5c4a, #2d8a6e); }

.contact-section { margin-top: 8px; }
.contact-card { gap: 12px; }
.contact-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.contact-icon { font-size: 18px; flex-shrink: 0; }
.contact-label { font-size: 13px; color: #8a9790; flex-shrink: 0; min-width: 50px; }
.contact-value { font-size: 14px; color: #2d3a35; font-weight: 500; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .2s; border-radius: 24px; }
.toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .2s; border-radius: 50%; }
input:checked + .toggle-slider { background: linear-gradient(135deg, #1a5c4a 0%, #2d8a6e 100%); }
input:checked + .toggle-slider:before { transform: translateX(20px); }

/* Profile textarea */
.profile-textarea { width: 100%; min-height: 80px; max-height: 150px; padding: 12px; border-radius: 8px; border: 1px solid #d0d5d2; background: #f8f9f8; font-size: 13px; color: #2d3a35; resize: vertical; outline: none; line-height: 1.6; }
.profile-textarea:focus { border-color: #1a5c4a; }
.profile-textarea::placeholder { color: #a0a8a3; }

/* Clear button */
.clear-btn { background: #fff3e0; color: #e65100; }
.clear-btn:hover { background: #ffe0b2; }

/* Logout button */
.logout-btn { background: #ffebee; color: #c62828; }
.logout-btn:hover { background: #ffcdd2; }

/* Entitlement modal styles */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.45); z-index: 998; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { width: 100%; max-width: 400px; max-height: 85vh; background: #fff; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.12); display: flex; flex-direction: column; overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #f0f0ed; flex-shrink: 0; }
.modal-header h3 { font-size: 17px; font-weight: 700; color: #2d3a35; margin: 0; }
.modal-close { width: 32px; height: 32px; border-radius: 50%; background: #f2f3f1; border: none; font-size: 20px; color: #8a9790; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-body { flex: 1; overflow-y: auto; padding: 16px 20px; -webkit-overflow-scrolling: touch; }

.current-level { text-align: center; padding: 12px 0 16px; border-bottom: 1px solid #f0f0ed; margin-bottom: 16px; }
.level-badge { display: inline-block; padding: 4px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.level-badge.free { background: #f5f5f5; color: #999; }
.level-badge.trial { background: #fff3e0; color: #e65100; }
.level-badge.paid { background: #e6f2ed; color: #1a5c4a; }
.level-badge.premium { background: linear-gradient(135deg, #c8963e 0%, #d4a574 100%); color: #fff; }
.level-badge.deeper { background: linear-gradient(135deg, #1a5c4a 0%, #2d8a6e 100%); color: #fff; }
.level-badge.lowrance { background: linear-gradient(135deg, #1565c0 0%, #42a5f5 100%); color: #fff; }
.level-name { font-size: 16px; font-weight: 600; color: #2d3a35; margin-bottom: 4px; }
.level-desc { font-size: 13px; color: #8a9790; margin-bottom: 8px; }
.level-days { font-size: 14px; color: #1a5c4a; font-weight: 500; }

.feature-section { margin-bottom: 16px; }
.feature-section h4 { font-size: 14px; font-weight: 600; color: #2d3a35; margin-bottom: 10px; }
.feature-list { display: flex; flex-direction: column; gap: 8px; }
.feature-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.feature-check { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.feature-check.check-yes { background: #e6f2ed; color: #1a5c4a; }
.feature-check.check-no { background: #f5f5f5; color: #ccc; }
.feature-name { font-size: 14px; color: #3d4a43; }

.ebook-section { margin-bottom: 16px; }
.ebook-section h4 { font-size: 14px; font-weight: 600; color: #2d3a35; margin-bottom: 10px; }
.ebook-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ebook-tag { display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: 12px; background: #f0f5f2; color: #1a5c4a; font-weight: 500; }

.upgrade-section { margin-top: 8px; }
.upgrade-section h4 { font-size: 14px; font-weight: 600; color: #2d3a35; margin-bottom: 10px; }
.upgrade-card { background: #f8f9f8; border-radius: 12px; padding: 14px; margin-bottom: 10px; cursor: pointer; transition: background 0.2s; }
.upgrade-card:active { background: #e6f2ed; }
.upgrade-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.upgrade-badge { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.upgrade-price { font-size: 12px; color: #c8963e; font-weight: 500; }
.upgrade-desc { font-size: 13px; color: #8a9790; margin-bottom: 8px; }
.unlock-features { display: flex; flex-wrap: wrap; gap: 6px; }
.unlock-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; background: #e6f2ed; color: #1a5c4a; font-weight: 500; }

.upgrade-detail-desc { font-size: 14px; color: #5a6760; margin-bottom: 8px; }
.upgrade-detail-price { font-size: 15px; color: #c8963e; font-weight: 600; margin-bottom: 16px; }
