/* TAE TRAX phone app */
:root {
  --bg: #000; --bg2: #0f0f0f; --bg3: #1a1a1a; --br: #262626;
  --tx1: #f2f2f2; --tx2: #b5b5b5; --tx3: #808080;
  --gold: #E8A020; --red: #e5484d;
  --fd: 'Bebas Neue', Impact, sans-serif; --fb: 'Syne', system-ui, sans-serif; --fm: 'DM Mono', ui-monospace, monospace;
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
  --tabs: 58px; --mini: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--tx1); font-family: var(--fb); font-size: 15px; }
body { overscroll-behavior-y: contain; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; }
[hidden] { display: none !important; }

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--st)) 16px 10px; background: rgba(0,0,0,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--br); }
.logo { font-family: var(--fd); font-size: 26px; letter-spacing: 2px; line-height: 1; }
.logo span { color: var(--gold); }
.net { font-family: var(--fm); font-size: 10px; letter-spacing: 1.5px; color: #000; background: var(--gold); border-radius: 20px; padding: 3px 8px; }
.me { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--br); font-family: var(--fm); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.me.in { background: var(--gold); color: #000; border-color: var(--gold); }

.install { display: flex; align-items: center; gap: 10px; margin: 10px 16px 0; padding: 12px 12px 12px 14px; background: var(--bg3); border: 1px solid var(--gold); border-radius: 14px; }
.install div { flex: 1; min-width: 0; }
.install b { display: block; font-size: 14px; }
.install span { display: block; color: var(--tx2); font-size: 12.5px; line-height: 1.45; margin-top: 2px; }
.install button { font-family: var(--fm); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; background: var(--gold); color: #000; border-radius: 30px; padding: 9px 14px; }
.install .x { background: none; color: var(--tx3); font-size: 22px; padding: 0 4px; }

#views { padding-bottom: calc(var(--tabs) + var(--sb) + 16px); }
body.has-mini #views { padding-bottom: calc(var(--tabs) + var(--mini) + var(--sb) + 16px); }
.view { display: none; padding: 12px 16px 0; }
.view.on { display: block; }
.h { font-family: var(--fd); font-size: 30px; letter-spacing: 1px; font-weight: 400; margin: 6px 0 4px; }
.sub { color: var(--tx2); font-size: 13px; line-height: 1.5; margin: 0 0 12px; }
.empty { color: var(--tx3); text-align: center; padding: 40px 10px; font-size: 14px; line-height: 1.6; }
.note { background: rgba(232,160,32,.12); border: 1px solid rgba(232,160,32,.45); color: var(--gold); border-radius: 10px; padding: 9px 12px; font-size: 13px; margin: 0 0 10px; }

.search input { width: 100%; background: var(--bg3); border: 1px solid var(--br); color: var(--tx1); border-radius: 12px; padding: 12px 14px; font-size: 16px; outline: none; -webkit-appearance: none; }
.search input:focus { border-color: var(--gold); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; font-family: var(--fm); font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; border: 1px solid var(--br); border-radius: 30px; padding: 7px 12px; color: var(--tx2); }
.chips button.on { background: var(--tx1); color: #000; border-color: var(--tx1); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #141414; }
.list li.cur .t b { color: var(--gold); }
.list .hit { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; }
.art { width: 48px; height: 48px; flex: none; border-radius: 8px; background: var(--bg3) center/cover no-repeat; display: grid; place-items: center; font-family: var(--fd); font-size: 18px; color: var(--tx3); overflow: hidden; }
.t { min-width: 0; flex: 1; }
.t b { display: block; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t small { display: block; color: var(--tx2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.t small i { font-style: normal; color: var(--gold); font-family: var(--fm); font-size: 10.5px; letter-spacing: 1px; margin-right: 6px; }
.more { width: 40px; height: 40px; flex: none; color: var(--tx2); font-size: 20px; border-radius: 50%; }
.more:active { background: var(--bg3); }

.card { background: var(--bg2); border: 1px solid var(--br); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.card p { color: var(--tx2); font-size: 14px; line-height: 1.55; margin: 0 0 12px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-family: var(--fm); font-size: 11px; letter-spacing: 1.5px; color: var(--tx3); margin-bottom: 6px; text-transform: uppercase; }
.field input { width: 100%; background: var(--bg3); border: 1px solid var(--br); color: var(--tx1); border-radius: 10px; padding: 12px; font-size: 16px; outline: none; }
.field input:focus { border-color: var(--gold); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--fm); font-size: 12.5px; font-weight: 700; letter-spacing: 1.5px; background: var(--gold); color: #000; border-radius: 30px; padding: 11px 18px; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--tx1); border: 1px solid var(--br); }
.btn.wide { width: 100%; }
.err { color: var(--red); font-size: 13.5px; margin: 0 0 10px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.back { color: var(--gold); font-family: var(--fm); font-size: 13px; padding: 4px 0; }
.pl { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border-bottom: 1px solid #141414; text-align: left; }
.pl .art { font-size: 22px; color: var(--gold); }
.links a { display: block; color: var(--tx1); text-decoration: none; padding: 12px 0; border-top: 1px solid var(--br); font-size: 14px; }
.links a:first-child { border-top: 0; }
.links a span { float: right; color: var(--tx3); }
.small { color: var(--tx3); font-size: 12px; line-height: 1.5; }

.mini { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabs) + var(--sb) + 6px); z-index: 30; height: var(--mini); display: flex; align-items: center; gap: 6px; padding: 0 8px; background: #1c1c1c; border: 1px solid #2c2c2c; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.6); overflow: hidden; }
.mini-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #2a2a2a; }
.mini-bar i { display: block; height: 100%; width: 0; background: var(--gold); }
.mini-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-align: left; }
.mini .art { width: 44px; height: 44px; }
.mini-t { min-width: 0; }
.mini-t b, .mini-t small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-t b { font-size: 14px; }
.mini-t small { color: var(--tx2); font-size: 12.5px; }
.ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; font-size: 22px; border-radius: 50%; }
.ic:active { background: rgba(255,255,255,.08); }
.ic.sm { font-size: 19px; color: var(--tx3); }
.ic.sm.on { color: var(--gold); }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; height: calc(var(--tabs) + var(--sb)); padding-bottom: var(--sb); background: rgba(0,0,0,.95); border-top: 1px solid var(--br); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-family: var(--fm); font-size: 10.5px; letter-spacing: 1px; color: var(--tx3); text-transform: uppercase; }
.tabs button span { font-size: 18px; line-height: 1; font-family: var(--fb); }
.tabs button.on { color: var(--gold); }

.full { position: fixed; inset: 0; z-index: 50; background: #000; overflow: hidden; animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.full-bg { position: absolute; inset: -40px; background: center/cover no-repeat; filter: blur(40px) brightness(.35); transform: scale(1.1); }
.full-in { position: relative; height: 100%; display: flex; flex-direction: column; padding: calc(8px + var(--st)) 22px calc(20px + var(--sb)); max-width: 520px; margin: 0 auto; }
.full-top { display: flex; align-items: center; justify-content: space-between; font-family: var(--fm); font-size: 11px; letter-spacing: 2px; color: var(--tx2); }
.full-art { width: min(100%, 46vh); aspect-ratio: 1; margin: 18px auto 0; border-radius: 14px; background: var(--bg3) center/cover no-repeat; box-shadow: 0 24px 60px rgba(0,0,0,.6); display: grid; place-items: center; font-family: var(--fd); font-size: 64px; color: var(--tx3); }
.full-t { margin-top: auto; padding-top: 18px; }
.full-t b { display: block; font-size: 22px; font-weight: 800; line-height: 1.2; }
.full-t span { display: block; color: var(--tx2); font-size: 15px; margin-top: 4px; }
.seek { margin-top: 18px; }
.seek input { width: 100%; accent-color: var(--gold); height: 28px; margin: 0; }
.times { display: flex; justify-content: space-between; font-family: var(--fm); font-size: 11.5px; color: var(--tx3); }
.ctrls { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.ctrls .ic { width: 54px; height: 54px; font-size: 26px; }
.play { width: 72px; height: 72px; border-radius: 50%; background: var(--tx1); color: #000; font-size: 28px; display: grid; place-items: center; }
.play:active { transform: scale(.96); }
.full-note { min-height: 18px; text-align: center; font-family: var(--fm); font-size: 11px; letter-spacing: 1px; color: var(--tx3); margin: 14px 0 0; }

.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: #161616; border-radius: 18px 18px 0 0; padding: 8px 0 calc(10px + var(--sb)); max-height: 80vh; overflow-y: auto; animation: up .18s ease-out; }
.sheet-h { display: flex; align-items: center; gap: 12px; padding: 10px 18px 12px; border-bottom: 1px solid var(--br); }
.sheet-h:empty { display: none; }
.sheet .opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 20px; font-size: 15px; text-align: left; }
.sheet .opt span { width: 22px; text-align: center; color: var(--tx2); }
.sheet .opt:active { background: #222; }
.sheet .opt.dim { color: var(--tx3); }
.sheet .sheet-in { padding: 14px 18px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabs) + var(--mini) + var(--sb) + 20px); transform: translateX(-50%); z-index: 70; background: var(--tx1); color: #000; font-size: 13.5px; font-weight: 600; padding: 10px 16px; border-radius: 30px; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.5); }

.ios-steps { counter-reset: s; list-style: none; padding: 0; margin: 4px 0 0; }
.ios-steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; font-size: 14.5px; line-height: 1.5; }
.ios-steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #000; font-family: var(--fm); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.share-ic { display: inline-block; vertical-align: -3px; width: 16px; height: 18px; }

@media (min-width: 700px) {
  #app { max-width: 560px; margin: 0 auto; border-left: 1px solid var(--br); border-right: 1px solid var(--br); min-height: 100vh; }
  .tabs, .mini { max-width: 560px; margin: 0 auto; }
  .mini { left: 8px; right: 8px; }
}
