body { font-size: 15px; overscroll-behavior: none; }
@supports (-webkit-touch-callout: none) { input, select, textarea { font-size: 16px !important; } }
.app { position: relative; z-index: 1; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 18px 12px; }
.top .logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #e9e9e9, 0 0 0 4px rgba(255, 255, 255, 0.07), 0 8px 24px -8px rgba(255, 255, 255, 0.32); }
.top-title { flex: 1; min-width: 0; }
.top-title b { display: block; font: 700 17px/1.2 var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-title small { color: var(--text-3); font-size: 12.5px; }

.tab { display: none; flex: 1; overflow: auto; padding: 4px 16px 24px; -webkit-overflow-scrolling: touch; }
.tab.active { display: block; animation: fadeIn .25s ease; }
.tab[data-tab="screen"].active { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.sec { margin: 22px 2px 10px; font: 600 12px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }

.tabbar { display: grid; grid-template-columns: repeat(6, 1fr); padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); background: rgba(12, 12, 12, .85); border-top: 1px solid var(--border); backdrop-filter: blur(20px); }
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: var(--text-3); font-size: 10px; white-space: nowrap; font-weight: 600; border-radius: 14px; transition: color .15s; }
.tabbar button svg { width: 23px; height: 23px; }
.tabbar button.active { color: #fff; }
.tabbar button.active svg { color: var(--accent); filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.28)); }
.tabbar .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10px; font-style: normal; display: grid; place-items: center; }

/* anéis */
.rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.ring { padding: 14px 6px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); text-align: center; }
.ring .r { position: relative; width: 74px; height: 74px; margin: 0 auto 8px; }
.ring svg { width: 74px; height: 74px; transform: rotate(-90deg); }
.ring .v { position: absolute; inset: 0; display: grid; place-items: center; font: 700 17px var(--font-display); }
.ring small { display: block; color: var(--text-2); font-size: 12px; font-weight: 600; }
.ring em { display: block; color: var(--text-3); font-size: 11px; font-style: normal; margin-top: 2px; }

/* energia */
.power { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pw { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); font-size: 11.5px; font-weight: 600; color: var(--text-2); transition: transform .1s, background .15s; }
.pw:active { transform: scale(.95); background: var(--surface-2); }
.pw i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: #bdbdbd; }
.pw i svg { width: 22px; height: 22px; }
.pw.red i { background: var(--danger-soft); color: #ff9db0; }
.pw.cyan i { background: rgba(255, 255, 255, 0.07); color: #d6d6d6; }
.pw.green i { background: rgba(255, 255, 255, 0.08); color: #d6d6d6; }

.audio-toggle { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); text-align: left; }
.audio-toggle i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); color: #d6d6d6; flex: none; }
.audio-toggle i svg { width: 22px; height: 22px; }
.audio-toggle div { flex: 1; min-width: 0; }
.audio-toggle b { display: block; font-weight: 650; }
.audio-toggle small { color: var(--text-3); font-size: 12.5px; }
.audio-toggle .switch { pointer-events: none; }
.audio-toggle.on { border-color: rgba(255, 255, 255, 0.19); background: rgba(255, 255, 255, 0.04); }
.media { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.md { height: 50px; border-radius: 15px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); }
.md:active { background: var(--surface-2); transform: scale(.95); }
.md svg { width: 21px; height: 21px; }
.send-text { display: flex; gap: 8px; }
.send-text .input { height: 46px; }
.send-text .btn { height: 46px; width: 46px; }
.uptime { text-align: center; color: var(--text-3); font-size: 12px; margin-top: 22px; }

/* tela do PC */
.viewer { position: relative; flex: 1; overflow: hidden; background: #000; touch-action: none; }
.stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transform-origin: 0 0; }
.stage img { max-width: 100%; max-height: 100%; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.stage img:not([src]) { visibility: hidden; }
.viewer-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--text-3); font-size: 13px; }
.vtools { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.vt { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(18, 18, 18, .78); border: 1px solid var(--border-2); color: var(--text); backdrop-filter: blur(12px); font-weight: 700; font-size: 12px; }
.vt svg { width: 21px; height: 21px; }
.vt.on { background: var(--accent); border-color: transparent; }
.keys { position: absolute; left: 8px; right: 62px; bottom: 8px; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-radius: 18px; background: rgba(18, 18, 18, .88); border: 1px solid var(--border-2); backdrop-filter: blur(14px); }
.keys button { height: 36px; padding: 0 11px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; }
.keys button:active { background: var(--accent); }
.keys button.mod.on { background: var(--accent); }
.mode-tip { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); padding: 8px 14px; border-radius: 99px; background: rgba(18, 18, 18, .9); border: 1px solid var(--border-2); font-size: 12.5px; font-weight: 600; opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 4; white-space: nowrap; }
.mode-tip.show { opacity: 1; }
.fps-tag { position: absolute; left: 10px; top: 10px; z-index: 3; padding: 4px 9px; border-radius: 9px; background: rgba(18, 18, 18, .72); border: 1px solid var(--border); font: 600 11.5px ui-monospace, Consolas, monospace; color: var(--text-2); pointer-events: none; }
.sheet .opt-title { margin: 18px 0 8px; font: 600 12px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.sheet .opt-title:first-of-type { margin-top: 0; }
.mon-list { display: flex; gap: 10px; }
.mon { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 8px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.mon.on { border-color: var(--accent); background: var(--accent-soft); color: #fff; }
.mon .shape { border: 2px solid currentColor; border-radius: 5px; opacity: .85; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--border); }
.seg button { height: 38px; border-radius: 10px; font-weight: 650; font-size: 13px; color: var(--text-2); }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.sheet .hint { color: var(--text-3); font-size: 12px; margin: 8px 2px 0; }
/* teclado: barra visível no topo (o Safari do iPhone não abre teclado para campo fora da tela) */
.kb-form { position: fixed; z-index: 60; left: 10px; right: 10px; top: calc(8px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 6px 0 14px; border-radius: 16px; background: rgba(24, 24, 24, .94); border: 1px solid var(--border-2); backdrop-filter: blur(14px); }
.kb-form[hidden] { display: none; }
.kb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text); flex: none; animation: kbBlink 1.2s infinite; }
@keyframes kbBlink { 50% { opacity: .25; } }
.kb-label { color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.kb-form input { flex: 1; min-width: 0; height: 36px; background: transparent; border: 0; outline: 0; color: transparent; caret-color: var(--text); font-size: 16px; }
.kb-close { height: 36px; padding: 0 14px; border-radius: 11px; background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 13px; }
.app.full .top, .app.full .tabbar { display: none; }

/* notificações */
.notif-head { display: flex; align-items: center; justify-content: space-between; margin: 10px 2px 10px; }
.pn { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 9px; }
.pn .app-ico { width: 38px; height: 38px; color: #bdbdbd; background: var(--accent-soft); }
.pn .app-ico svg { width: 20px; height: 20px; }
.pn .b { flex: 1; min-width: 0; }
.pn .m { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.pn .m b { color: var(--text-2); }
.pn .t { font-weight: 650; }
.pn .x { color: var(--text-2); white-space: pre-wrap; word-break: break-word; font-size: 14px; }

/* celular */
.perm { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 9px; }
.perm .ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: #bdbdbd; flex: none; }
.perm .ic svg { width: 20px; height: 20px; }
.perm .b { flex: 1; min-width: 0; }
.perm .b b { display: block; font-weight: 650; }
.perm .b small { color: var(--text-3); font-size: 12.5px; }
.perm .ok { color: var(--ok); font-weight: 700; font-size: 12.5px; }
.big-btn { width: 100%; height: 54px; border-radius: 16px; font-size: 15px; margin-top: 4px; }
.note { color: var(--text-3); font-size: 12.5px; margin: 8px 4px 0; line-height: 1.5; }
.steps-ios { padding-left: 20px; margin-bottom: 10px; }
.steps-ios li { margin: 4px 0; }
.steps-ios code, .note code { color: var(--text-2); }
.key-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

/* folha de confirmação */
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 50; animation: fadeIn .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #161616; border-top: 1px solid var(--border-2); animation: sheetUp .3s cubic-bezier(.2, 1, .3, 1); }
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .2); margin: -8px auto 18px; }
.sheet .big-ic { width: 60px; height: 60px; border-radius: 19px; display: grid; place-items: center; margin-bottom: 14px; background: var(--danger-soft); color: #ff9db0; }
.sheet .big-ic svg { width: 28px; height: 28px; }
.sheet h2 { margin: 0 0 6px; font: 700 21px var(--font-display); }
.sheet p { margin: 0 0 20px; color: var(--text-2); }
.sheet .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet .btn { height: 50px; border-radius: 15px; }
.sheet .btn.danger { background: var(--danger); color: #fff; border-color: transparent; }

.toasts { left: 16px; right: 16px; top: calc(12px + env(safe-area-inset-top)); align-items: center; }

/* MineTrack */
.mt-hero { position: relative; overflow: hidden; padding: 18px; border-radius: 22px; background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)); border: 1px solid rgba(255, 255, 255, 0.12); margin-top: 6px; }
.mt-hero .row1 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mt-hero .host { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.mt-hero .total { font: 800 38px/1 var(--font-display); margin: 10px 0 4px; letter-spacing: -.02em; }
.mt-hero .sub { color: var(--text-2); font-size: 13px; }
.mt-fav { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border-2); margin-top: 10px; }
.mt-fav .big { font: 800 30px/1 var(--font-display); color: var(--accent); }
.mt-fav .meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.mt-fav .name { font-weight: 700; font-size: 16px; }
.mt-fav .rank { font: 800 13px var(--font-display); color: var(--accent); }
.mt-fav svg.spark { width: 110px; height: 40px; flex: none; margin-left: auto; }
.mt-row { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 7px; width: 100%; text-align: left; }
.mt-row.err { opacity: .55; }
.mt-row .pos { width: 22px; text-align: center; font: 800 13px var(--font-display); color: var(--text-3); flex: none; }
.mt-row .pos.podium { color: var(--accent); }
.mt-row img, .mt-fav img, .mt-ico { width: 38px; height: 38px; border-radius: 10px; flex: none; image-rendering: pixelated; background: var(--surface-2); object-fit: cover; }
.mt-row .b { flex: 1; min-width: 0; }
.mt-row .n { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.mt-row .n svg { width: 13px; height: 13px; color: var(--accent); fill: var(--accent); flex: none; }
.mt-row .s { font-size: 11.5px; color: var(--text-3); }
.mt-row svg.spark { width: 64px; height: 26px; flex: none; }
.mt-row .p { min-width: 54px; text-align: right; flex: none; }
.mt-row .p b { display: block; font: 750 17px var(--font-display); }
.mt-row .p small { font-size: 11px; font-weight: 700; }
.up { color: var(--ok); } .down { color: var(--danger); } .flat { color: var(--text-3); }
.mt-add { display: flex; gap: 8px; margin-top: 14px; }
.mt-src { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.mt-src button { height: 30px; padding: 0 12px; border-radius: 99px; background: var(--surface-2); font-size: 12px; font-weight: 650; color: var(--text-2); }
.mt-src button.on { background: var(--accent); color: var(--on-accent); }
.sheet svg.chart { width: 100%; height: 190px; display: block; margin: 6px 0 4px; }
.sheet .stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 16px; }
.sheet .stats3 div { padding: 12px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); text-align: center; }
.sheet .stats3 b { display: block; font: 750 19px var(--font-display); }
.sheet .stats3 small { color: var(--text-3); font-size: 11.5px; }
.sheet .sh-head { display: flex; align-items: center; gap: 12px; }
.sheet .sh-head h2 { margin: 0; }

/* Novidades */
.nw-head { display: flex; gap: 8px; margin-top: 6px; }
.search-m { flex: 1; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid var(--border-2); color: var(--text-3); }
.search-m svg { width: 18px; height: 18px; flex: none; }
.search-m input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font-size: 15px; }
.nw-head .btn { height: 44px; width: 44px; }
.nw-chips { margin: 10px 0 12px; }
.nw-note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); border: 1px solid rgba(255, 255, 255, 0.12); color: var(--text-2); font-size: 13px; margin-bottom: 12px; }
.nw-note svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 1px; }
.nw-note.warn { background: rgba(255,106,92,.1); border-color: rgba(255,106,92,.3); }
.nw { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 9px; }
.nw.hi { border-color: rgba(255, 255, 255, 0.18); background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), var(--surface)); }
.nw-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 7px; }
.nw-proj { font: 750 12px var(--font-display); color: var(--accent); }
.nw-cat { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.nw-date { margin-left: auto; color: var(--text-3); font-size: 11.5px; }
.nw-title { font-weight: 700; font-size: 15px; line-height: 1.35; }
.nw-exp { color: var(--text-2); margin-top: 5px; font-size: 14px; line-height: 1.5; }
.nw-more { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.nw-orig { width: 100%; font-size: 12.5px; color: var(--text-3); padding: 9px 11px; border-radius: 11px; background: rgba(0,0,0,.25); margin-bottom: 4px; word-break: break-word; }
.nw-orig b { color: var(--text-2); }
.nw-btn { height: 30px; padding: 0 11px; border-radius: 9px; background: var(--surface-2); font-size: 12px; font-weight: 650; color: var(--text-2); }
