/* Step 5 member app */
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; padding-bottom: 96px; }
.top { position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 2px solid var(--gold); padding: 8px 12px; display: flex; align-items: center; gap: 8px; min-height: 60px; }
.top h1 { font-size: 17px; flex: 1 1 auto; min-width: 0; }
.top .sub { font-size: 12px; color: var(--muted); font-weight: 400; display: block; }
.iconbtn { width: 44px; height: 44px; border-radius: 22px; border: 0; background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; text-decoration: none; position: relative; }
.iconbtn:hover { background: var(--soft); color: var(--ink); }
.iconbtn.bordered { border: 1px solid var(--line); background: var(--card); }
.badge { position: absolute; top: 4px; left: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.page { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.section-title { font-size: 16px; font-weight: 700; margin-top: 4px; }

.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px 4px calc(10px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; color: var(--muted); text-decoration: none; font-size: 12px; position: relative; }
.tabs a.on { color: var(--royal); font-weight: 700; }
.tabs a.on::before { content: ''; position: absolute; top: -6px; width: 28px; height: 3px; border-radius: 2px; background: var(--gold); }
.tabs .badge { top: 0; left: calc(50% - 22px); }

.hero { background: linear-gradient(150deg, var(--royal-3), var(--royal) 60%); color: #fff; border: 1px solid rgba(197,160,89,.45); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.hero .big { font-family: var(--num); font-size: 34px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.1; }
.hero .muted { color: #C8D3EE; }
.hero .big { color: var(--gold-2); }
.hero .tile { background: rgba(255,255,255,.08); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.hero .tile b { font-family: var(--num); font-size: 16px; }
.hero .tile.amber b { color: var(--gold-2); }

.alert-link { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 14px; border-radius: 14px; text-decoration: none; font-weight: 600; font-size: 14px; }
.alert-link.warn { background: var(--amber-soft); color: var(--amber-text); }
.alert-link.bad { background: var(--red-soft); color: var(--red-text); }
.alert-link.info { background: var(--blue-soft); color: var(--blue); }
.alert-link span.grow { flex: 1; }

.slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; text-align: center; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--muted); font-size: 11px; background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; min-width: 0; }
.slot .dot { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; overflow: hidden; }
.slot .dot img { width: 100%; height: 100%; object-fit: cover; }
.slot.used .dot { background: var(--gold); color: var(--royal); }
.slot.open .dot { background: var(--amber-soft); color: var(--amber-text); border: 2px solid var(--amber); }
.slot.open { color: var(--amber-text); font-weight: 600; }
.slot.locked .dot { background: var(--soft); color: var(--muted); }
.slot span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.codebox { display: flex; align-items: center; gap: 8px; background: var(--ground); border-radius: 12px; padding: 8px 8px 8px 12px; }
.codebox .code { flex: 1; font-family: var(--num); font-size: 22px; font-weight: 700; letter-spacing: 2px; direction: ltr; text-align: right; }

.course { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.course .ic { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.course .ic.kids { background: var(--green-soft); color: var(--green); }
.course .ic.adults { background: var(--blue-soft); color: var(--blue); }
.course-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.course-choice label { flex-direction: column; align-items: flex-start; gap: 2px; }
.course-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.step { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.step .num-dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 700; font-size: 14px; }
.step.done .num-dot { background: var(--gold); color: var(--royal); }
.step.wait .num-dot { background: var(--amber-soft); color: var(--amber-text); }
.step.locked { color: var(--muted); }
.step.locked .num-dot { background: var(--soft); color: var(--muted); }
.step.bad .num-dot { background: var(--red-soft); color: var(--red); }
.current { border: 2px solid var(--gold); }
.payto { background: var(--ground); border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.payto b { font-family: var(--num); font-size: 17px; direction: ltr; }
.progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; display: flex; }
.progress i { display: block; background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-2)); }

.receipt-img { width: 100%; max-height: 360px; object-fit: contain; background: var(--soft); border-radius: 12px; border: 1px solid var(--line); cursor: zoom-in; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); flex-shrink: 0; }

.chain { display: flex; flex-direction: column; }
.chain .lnk { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.chain .bar { width: 2px; height: 10px; background: var(--line); margin-right: 15px; }
.chain .me { background: var(--green-soft); border-radius: 10px; padding: 6px 8px; }

.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--soft); text-decoration: none; color: var(--ink); min-height: 52px; }
.list-item:last-child { border-bottom: 0; }
.levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.levels i { height: 8px; border-radius: 4px; background: var(--line); }
.levels i.on { background: var(--gold); }

.chat { display: flex; flex-direction: column; gap: 8px; padding: 16px; min-height: 50vh; }
.bubble { max-width: 80%; padding: 10px 14px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.bubble.mine { align-self: flex-start; background: var(--green); color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble.theirs { align-self: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; }
.bubble img { border-radius: 10px; margin-top: 4px; max-height: 240px; }
.bubble .at { font-size: 11px; opacity: .75; margin-top: 4px; }
.composer { position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding: 8px 10px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: center; }
.composer input[type=text] { border-radius: 22px; background: var(--ground); }

.auth { padding: 32px 20px; display: flex; flex-direction: column; gap: 16px; }
.auth .brand { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 0 8px; text-align: center; }
.auth .brand img { width: 240px; height: auto; border-radius: 0; }
.auth .brand .logo b { font-size: 34px; }
.linkbtn { background: none; border: 0; color: var(--green); font: inherit; font-weight: 600; cursor: pointer; padding: 8px; min-height: 44px; }

.lightbox { position: fixed; inset: 0; background: rgba(21, 32, 43, .92); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lightbox img { max-height: 92vh; border-radius: 8px; }
.empty { text-align: center; color: var(--muted); padding: 24px 12px; font-size: 14px; }
.terms h3 { margin-bottom: 6px; }
.terms .card { line-height: 1.8; font-size: 14px; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.kv > :first-child { color: var(--muted); }

/* catalog v2 */
.course .ic.ai { background: var(--blue-soft); color: var(--royal); }
.course .ic.market { background: var(--gold-soft); color: var(--gold-dark); }
.course .price { align-items: flex-end; gap: 0; text-align: left; }
.ic-lg { width: 56px; height: 56px; border-radius: 16px; background: var(--blue-soft); color: var(--royal); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.big-price { font-size: 22px; color: var(--royal); }
.analysis-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); border: 1px solid var(--gold-2); background: linear-gradient(135deg, #fff, var(--gold-soft)); }
.analysis-card .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--royal); color: var(--gold-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* public landing */
.welcome { min-height: 100vh; }
.w-hero { background: linear-gradient(160deg, var(--royal-3), var(--royal) 65%); color: #fff; padding: 28px 20px 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; border-bottom: 3px solid var(--gold); border-radius: 0 0 24px 24px; }
.w-logo { width: 220px; height: auto; }
.w-hero h1 { font-size: 22px; line-height: 1.5; }
.w-hero p { color: #C8D3EE; font-size: 14px; max-width: 420px; }
.w-cta { gap: 10px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
.btn.outline-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn.outline-light:hover { color: #fff; background: rgba(255,255,255,.1); }
.gold-note { background: var(--gold-soft); color: var(--gold-text); border: 1px solid var(--gold-2); }
.steps-list { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* channels */
.ch-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--blue-soft); color: var(--royal); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ch-ic.locked { background: var(--soft); color: var(--muted); }
.iconbtn.on { background: var(--gold-soft); color: var(--gold-dark); border-color: var(--gold-2); }
.post-body { white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.8; }
.post-imgs { display: grid; gap: 4px; border-radius: 12px; overflow: hidden; }
.post-imgs.n2, .post-imgs.n4 { grid-template-columns: 1fr 1fr; }
.post-imgs.n3 { grid-template-columns: 1fr 1fr; }
.post-imgs.n3 img:first-child { grid-column: span 2; }
.post-imgs img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; cursor: zoom-in; }
.tg-btn { border-color: #229ED9; color: #1679A8; }

/* sign in with Google */
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; }
.gbtn:hover { background: #f7f8fa; }
.gbtn svg { flex: none; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted, #6b7280); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line, #e5e7eb); }

.paycard { display: flex; flex-direction: column; align-items: center; gap: 2px; background: #082970; color: #fff; border: 2px solid #C5A059; padding: 12px; }
.paycard b { font-size: 17px; }
.paycard .cards { font-size: 12px; letter-spacing: .5px; color: #f3e3bf; direction: ltr; }
