/* User app (PWA) */
body.app { background: var(--panel); min-height: 100vh; min-height: 100dvh; }
.app-shell { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--panel); display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; background: var(--forest); color: var(--white); display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 60px; }
.topbar h1 { font-family: var(--display); font-size: 21px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .icon-btn { color: var(--white); border-color: rgba(255,255,255,.25); }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.lang-btn { min-width: 44px; height: 36px; padding: 0 10px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.35); background: transparent; color: var(--white); font-weight: 700; cursor: pointer; }
.screen { flex: 1; padding: 16px 16px 104px; display: flex; flex-direction: column; gap: 16px; }
.screen.no-nav { padding-bottom: 32px; }

.bottom-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px; background: var(--white); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.bottom-nav a[aria-current="page"] { color: var(--green); }
.bottom-nav a[aria-current="page"] svg { stroke: var(--green); }

/* Auth */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--forest); color: var(--white); }
.auth-top { padding: 32px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.auth-top .logo { color: var(--white); }
.auth-top h2 { font-family: var(--display); font-size: 34px; line-height: 1.15; }
.auth-top p { color: #D3E4DA; font-size: 17px; }
.auth-card { flex: 1; background: var(--white); color: var(--ink); border-radius: 28px 28px 0 0; padding: 28px 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.otp-input { letter-spacing: 12px; font-size: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.dev-code { background: var(--gold-soft); border: 1px dashed var(--gold); padding: 10px 14px; border-radius: 12px; font-size: 15px; }

/* Home */
.hello { display: flex; flex-direction: column; gap: 2px; }
.hello h2 { font-family: var(--display); font-size: 26px; color: var(--forest); line-height: 1.2; }
.wallet { background: var(--forest); color: var(--white); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-sm); }
.wallet .amt { font-family: var(--display); font-size: 40px; font-weight: 800; color: var(--gold); line-height: 1; }
.wallet .row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: #D3E4DA; flex-wrap: wrap; }
.wallet .row b { color: var(--white); }
.wallet .btn { align-self: flex-start; }
.notice { background: var(--gold-soft); border: 1px solid #F4D79A; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.notice b { color: var(--forest); }
.section-title { font-family: var(--display); font-size: 21px; color: var(--forest); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.section-title a { font-family: var(--font); font-size: 15px; font-weight: 600; }

.project { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.project:hover { border-color: var(--green-line); color: inherit; }
.project .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.project h3 { font-size: 19px; font-weight: 700; color: var(--ink); }
.project .rate { font-family: var(--display); font-weight: 800; color: var(--green); font-size: 20px; white-space: nowrap; }
.project .rate small { font-family: var(--font); font-weight: 500; font-size: 13px; color: var(--muted); }
.project .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.project p { color: var(--body); font-size: 15px; }
.mini-bar { height: 6px; border-radius: 999px; background: #E6EEE9; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--green); }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick a { background: var(--white); border: 1px solid var(--line); border-radius: 16px; min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: var(--body); font-weight: 600; font-size: 14px; text-align: center; padding: 8px; }

.empty { text-align: center; padding: 32px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty b { color: var(--ink); font-size: 18px; }

/* Record */
.task-card { background: var(--white); border-radius: 24px; padding: 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 16px; }
.task-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); gap: 8px; }
.task-head b { color: var(--green); }
.prompt-text { font-size: 26px; line-height: 1.5; font-weight: 600; color: var(--ink); word-break: break-word; }
.prompt-text.topic { font-size: 22px; }
.prompt-img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 16px; background: var(--panel); }
.instr { font-size: 15px; color: var(--muted); }
.meter { height: 64px; width: 100%; display: block; background: var(--green-soft); border-radius: 14px; }
.timer { font-variant-numeric: tabular-nums; font-size: 15px; color: var(--muted); display: flex; justify-content: space-between; }
.rec-controls { display: flex; justify-content: center; align-items: center; gap: 28px; padding: 4px 0; }
.round-btn { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--white); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.round-btn[disabled] { opacity: .4; cursor: not-allowed; }
.rec-btn { width: 84px; height: 84px; border-radius: 50%; border: none; background: var(--green); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 0 0 8px var(--green-soft); }
.rec-btn.recording { background: var(--rec); box-shadow: 0 0 0 8px var(--rec-soft); animation: pulse 1.4s ease-in-out infinite; }
.rec-btn .stop { width: 26px; height: 26px; background: var(--white); border-radius: 7px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px var(--rec-soft); } }
.rec-hint { text-align: center; font-size: 15px; color: var(--body); min-height: 24px; }
.submit-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.tips { font-size: 15px; color: var(--body); }
.tips summary { cursor: pointer; font-weight: 700; color: var(--green); min-height: 44px; display: flex; align-items: center; }
.tips ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.session-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 15px; }
.session-bar b { color: var(--green); }
.transcribe-box { min-height: 140px; font-size: 20px; line-height: 1.5; }

/* Lists */
.list { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .grow span { font-size: 14px; color: var(--muted); }
.list-item .amt { font-weight: 700; white-space: nowrap; }
.amt.plus { color: var(--ok); }
.amt.minus { color: var(--bad); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-box { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.stat-box b { display: block; font-family: var(--display); font-size: 26px; color: var(--forest); line-height: 1.1; }
.stat-box span { font-size: 14px; color: var(--muted); }
.rank { width: 36px; height: 36px; border-radius: 50%; background: var(--panel); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.rank.r1 { background: var(--gold); color: var(--forest); }
.rank.r2 { background: #D9DEE2; }
.rank.r3 { background: #EBC9A8; }
.list-item.me { background: var(--green-soft); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.tabs button { flex: none; min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--white); cursor: pointer; font-weight: 600; }
.tabs button[aria-selected="true"] { background: var(--forest); color: var(--white); border-color: var(--forest); }

.ref-card { background: var(--forest); color: var(--white); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.ref-code { font-family: var(--display); font-size: 34px; letter-spacing: 4px; color: var(--gold); }
.ref-card p { color: #D3E4DA; }
.consent-text { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 18px; max-height: 50vh; overflow-y: auto; font-size: 16px; line-height: 1.7; color: var(--body); }
.consent-text h3 { font-size: 18px; color: var(--forest); margin: 12px 0 6px; }
.consent-text ul { padding-left: 20px; margin: 0; }
.check-row { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; cursor: pointer; }
.check-row input { width: 24px; height: 24px; flex: none; margin-top: 2px; accent-color: var(--green); }
.install-bar { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--green-line); border-radius: 16px; padding: 12px 14px; }
.install-bar .grow { flex: 1; }
.offline-bar { background: var(--warn-soft); color: var(--warn); padding: 10px 16px; font-size: 15px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.loading { display: flex; justify-content: center; padding: 48px; color: var(--green); }
.form-grid { display: flex; flex-direction: column; gap: 14px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.link-list a { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; min-height: 52px; }
.link-list a:last-child { border-bottom: none; }
.ticket { border-top: 1px solid var(--line); padding-top: 12px; }
.ticket .reply { background: var(--green-soft); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }

/* LootBeez additions */
.logo b span { color: var(--green); }
.auth-top .logo b span, .side .logo b span { color: var(--gold); }
.topbar .bell { position: relative; color: var(--white); border-color: rgba(255,255,255,.25); text-decoration: none; }
.topbar .bell .dot { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: var(--forest); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.level-card { display: flex; gap: 14px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.level-card .grow { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.level-card b { font-size: 18px; }
.level-badge { width: 48px; height: 48px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 22px; background: var(--panel); color: var(--muted); }
.tier-bronze .level-badge { background: #F3E3D3; color: #8A4B14; }
.tier-silver .level-badge { background: #E5EAEE; color: #4B5963; }
.tier-gold { border-color: var(--gold); background: var(--gold-soft); }
.tier-gold .level-badge { background: var(--gold); color: var(--forest); }
.quiz { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.quiz-q { font-size: 17px; font-weight: 700; color: var(--ink); }
.quiz .check-row input { margin-top: 3px; }
.list-item.notif.unread { background: var(--green-soft); }
