:root {
  color-scheme: light;
  --bg: #fafaf7;
  --text: #1a1a1a;
  --muted: #8a8a85;
  --line: rgba(0, 0, 0, 0.05);
  --card: #fff;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button { font: inherit; }
.shell { width: 100%; max-width: 430px; min-height: 100vh; margin: 0 auto; position: relative; padding-bottom: 96px; }
.view { min-height: calc(100vh - 96px); }
.page { padding: 44px 24px 24px; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.title { margin: 0; font-size: 34px; line-height: 1.05; letter-spacing: -0.02em; }
.home-title { margin-bottom: 10px; }
.section-title { margin: 34px 0 14px; font-size: 22px; letter-spacing: -0.02em; }
.card { background: var(--card); border: 1px solid rgba(0,0,0,.04); border-radius: 24px; box-shadow: 0 1px 2px rgba(0,0,0,.03); overflow: hidden; }
.balance { display: block; padding: 24px; color: inherit; text-decoration: none; }
.balance-top, .balance-bottom { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
.balance-num { margin-top: 14px; display: flex; align-items: baseline; gap: 8px; }
.balance-num strong { font-size: 56px; line-height: 1; letter-spacing: -0.03em; }
.balance-bottom b { color: var(--text); }
.progress { height: 3px; border-radius: 99px; background: rgba(0,0,0,.06); overflow: hidden; margin: 20px 0 14px; }
.progress span { display: block; height: 100%; background: var(--text); border-radius: inherit; }
.list-row { width: 100%; display: flex; gap: 14px; align-items: center; padding: 16px 20px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; color: inherit; text-decoration: none; }
.list-row:first-child { border-top: 0; }
.badge { width: 48px; height: 48px; border-radius: 999px; background: #f1f0eb; display: grid; place-items: center; color: #6a6a65; font-size: 11px; font-weight: 700; flex: 0 0 auto; }
.row-main { min-width: 0; flex: 1; }
.row-title { margin: 0; font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { color: #c0c0bb; font-size: 24px; }
.empty { color: var(--muted); text-align: center; padding: 36px 18px; font-size: 14px; }
.tabbar { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 430px; display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px 12px max(env(safe-area-inset-bottom), 8px); background: rgba(250,250,247,.88); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
.tab { min-height: 60px; border: 0; background: transparent; color: #9a9a95; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; font-size: 22px; }
.tab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab span { font-size: 11px; font-weight: 600; }
.tab.active { color: var(--text); }
.tab.active svg { stroke-width: 2.2; }
.toplink { min-height: 44px; display: inline-flex; align-items: center; border: 0; background: transparent; padding: 0; color: var(--text); font-weight: 650; }
.meta { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.detail-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 22px; padding: 5px; border-radius: 999px; background: #efeee9; }
.detail-tab { min-width: 0; min-height: 38px; border: 0; border-radius: 999px; background: transparent; color: #777772; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-tab.active { background: var(--text); color: #fff; }
.panel { margin-top: 12px; padding: 18px; border-radius: 20px; background: #fff; border: 1px solid rgba(0,0,0,.04); line-height: 1.55; font-size: 15px; white-space: pre-wrap; }
.language-list { padding: 0; white-space: normal; overflow: hidden; }
.translation-label { margin-top: 18px; }
.translation-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 14px -2px 10px; padding: 0 2px 2px; }
.mini-tab { flex: 0 0 auto; min-height: 34px; border: 1px solid rgba(0,0,0,.06); border-radius: 999px; background: #fff; color: var(--muted); padding: 0 14px; font-size: 13px; font-weight: 650; }
.mini-tab.active { background: var(--text); border-color: var(--text); color: #fff; }
.loading-panel { display: flex; gap: 12px; align-items: center; white-space: normal; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(0,0,0,.12); border-top-color: var(--text); border-radius: 999px; flex: 0 0 auto; animation: spin .8s linear infinite; }
.transcript { margin-top: 30px; padding-bottom: 18px; }
.segment { margin-bottom: 24px; }
.segment-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.segment-head time { color: var(--muted); font-size: 12px; font-weight: 500; }
.segment p { margin: 0; font-size: 16px; line-height: 1.55; }
.sticky { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); width: 100%; max-width: 430px; padding: 0 24px; pointer-events: none; }
.primary { width: 100%; min-height: 54px; border: 0; border-radius: 999px; background: var(--text); color: #fff; font-weight: 650; pointer-events: auto; box-shadow: 0 8px 24px -8px rgba(0,0,0,.25); }
.primary:disabled { opacity: .45; }
.inline-primary { margin-top: 18px; box-shadow: none; }
.billing-card { padding: 18px; }
.billing-note { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.package-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.package-pill { min-width: 0; min-height: 42px; border: 1px solid rgba(0,0,0,.06); border-radius: 999px; background: #f5f4ef; color: var(--text); font-weight: 700; }
.package-pill.active { background: var(--text); border-color: var(--text); color: #fff; }
.range-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.range-top, .range-scale { display: flex; align-items: center; justify-content: space-between; }
.range-top { color: var(--muted); font-size: 13px; }
.range-top strong { color: var(--text); font-size: 26px; line-height: 1; }
.range-scale { color: var(--muted); font-size: 12px; }
.minute-range { width: 100%; margin: 16px 0 8px; accent-color: var(--text); }
.subscription-list { display: grid; gap: 8px; }
.subscription-row { width: 100%; min-height: 62px; border: 1px solid rgba(0,0,0,.06); border-radius: 18px; background: #f7f6f1; display: flex; align-items: center; gap: 12px; padding: 12px; color: inherit; text-align: left; }
.subscription-row.active { border-color: var(--text); background: #fff; }
.subscription-row .check { width: 28px; height: 28px; border-radius: 999px; background: #ebeae4; display: grid; place-items: center; font-size: 14px; font-weight: 800; flex: 0 0 auto; }
.subscription-row.active .check { background: var(--text); color: #fff; }
.subscription-row strong, .subscription-row small { display: block; }
.subscription-row small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 16px 8px; text-align: center; }
.stat strong { display: block; font-size: 22px; }
.stat span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.danger { color: #c0392b; }
.loader { padding: 80px 24px; text-align: center; color: var(--muted); }
.error { padding: 40px 24px; color: #c0392b; text-align: center; }
@keyframes spin { to { transform: rotate(360deg); } }
