/* RadarTick interface system. Component geometry is shared across both themes. */
body{font-family:var(--font);font-size:14px;line-height:1.55;letter-spacing:-.12px;font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}button,a,input,select,summary{touch-action:manipulation}button,a,input,select{transition:background-color var(--fast),color var(--fast),border-color var(--fast),box-shadow var(--fast)}
button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:10px 15px;font-weight:550;border-radius:10px;background:var(--panel2);border:1px solid var(--line)}button:active:not(:disabled){background:var(--accent-soft)}button:disabled{opacity:.5;cursor:not-allowed}button[aria-busy=true]{cursor:progress}
button:hover:not(:disabled){border-color:var(--blue)}a:hover{color:var(--blue)}a.primary:hover,.primary:hover,.ema-page .primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:#fff}.primary,.ema-page .primary{background:var(--accent);border-color:var(--accent);color:#fff}
:focus-visible{outline:3px solid var(--blue);outline-offset:3px}input,select,textarea{background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:11px 13px;color:var(--text)}input:focus,select:focus{border-color:var(--blue)}input[type=checkbox],input[type=range]{accent-color:var(--accent)}
h1{font-size:30px;font-weight:650;line-height:1.2;letter-spacing:-.9px}h2{font-size:19px;font-weight:630;letter-spacing:-.35px}h3{font-size:16px;font-weight:600}.muted,p,small{color:var(--muted)}
.icon{width:20px;height:20px;flex-shrink:0;vertical-align:middle;pointer-events:none}.icon-link{display:inline-flex;align-items:center;gap:7px}.icon-link .icon{width:16px;height:16px}.actions{gap:10px;align-items:center}.actions a:not(.primary){padding:8px 0}.card .actions a,.card .actions button{font-size:13px}
.shell{min-height:100dvh}.sidebar{width:222px;padding:30px 18px;background:var(--glass);border-right:1px solid var(--line);position:sticky;top:0;height:100dvh}.brand{font-size:21px;font-weight:650;letter-spacing:-.8px}.brand b,.header-brand b{color:var(--text);font-weight:650}.logo{background:var(--accent);border-radius:10px;width:34px;height:34px;margin-right:3px;color:white}.logo .icon{width:23px;height:23px}.workspace-label{font-size:10px;letter-spacing:1.25px;margin:38px 12px 14px}
#nav{gap:5px}#nav a{display:flex;align-items:center;gap:12px;min-height:46px;padding:12px;color:var(--muted);font-size:14px;font-weight:500;border-radius:10px}#nav a.active,.light #nav a.active{color:var(--blue);background:var(--accent-soft)}#nav a:not(.active):hover{background:var(--panel2);color:var(--text)}.sidebar-bottom{padding-top:32px}.mini-note{line-height:1.8}
.topbar{position:sticky;top:0;z-index:4;height:70px;background:var(--glass);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-bottom:1px solid var(--line);padding:0 36px}.topbar #crumb{font-size:13px;font-weight:550}.theme-toggle{width:40px;height:40px;min-height:40px;border-radius:50%;background:var(--panel);padding:0}.theme-toggle .icon{width:20px;height:20px}
main{max-width:1320px;width:100%;padding:32px 36px 48px}.card,.signal-card,.ema-page .settings-card{border-radius:var(--radius);border:1px solid var(--line);box-shadow:0 2px 6px #00000003;background:var(--panel);padding:24px}.card p{font-size:14px;line-height:1.65}.card+.card{margin-top:16px}.card h2 .icon{margin-right:8px;color:var(--blue)}footer{font-size:11px;padding:22px 36px}
.page-intro{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;gap:20px}.page-intro h1{margin:0 0 6px}.page-intro p{margin:0}.eyebrow{color:var(--muted);letter-spacing:1.4px;font-size:10px}.landing-hero h1{font-size:clamp(34px,4.7vw,60px);font-weight:650}.landing-hero .eyebrow{color:var(--blue)}.landing-hero>p{font-size:16px}.landing-tags span{background:var(--panel);border-color:var(--line)}.landing-features .feature-number{color:var(--blue);background:var(--accent-soft);border-radius:9px;width:32px;height:32px;display:grid;place-items:center;letter-spacing:0}.landing-features .card h3{margin-bottom:10px}.ema-illustration{background:var(--accent-soft)}
.overview-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border:1px solid var(--line);border-radius:14px;background:var(--panel);margin:0 0 30px}.overview-item{display:flex;gap:12px;align-items:center;padding:19px 22px;min-width:0}.overview-item+.overview-item{border-left:1px solid var(--line)}.overview-item>.icon{color:var(--muted)}.overview-item small{display:block;font-size:11px;margin-bottom:3px}.overview-item strong{font-size:13px;font-weight:580}.status-dot{display:inline-block;width:6px;height:6px;background:currentColor;border-radius:50%;margin-right:6px;vertical-align:middle}.tone-good{color:var(--green)}.tone-warn{color:var(--amber)}.tone-down{color:var(--danger)}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr);gap:24px;align-items:start}.section-title{display:flex;justify-content:space-between;gap:14px;align-items:center;margin:0 0 4px}.section-title h2{font-size:18px}.section-title a{font-size:12px}.feed-toolbar{height:44px;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px;margin-bottom:6px}.feed-toolbar button{padding:5px 10px;min-height:32px;color:var(--blue);font-size:12px;background:var(--accent-soft);border-color:transparent}.feed-toolbar>.icon{width:14px;height:14px}
.signal-card{margin:0 0 12px;padding:22px}.signal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.signal-coin{display:flex;align-items:center;gap:12px;min-width:0}.coin-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;color:var(--blue);background:var(--accent-soft);flex-shrink:0}.signal-card h3{font-size:20px;letter-spacing:-.4px;margin:0;line-height:1.3}.signal-card h3 a{color:var(--text)}.signal-source{font-size:11px;margin:3px 0 0;display:inline-flex;align-items:center;gap:4px;color:var(--muted)}.signal-source .icon{width:12px;height:12px}.signal-stage{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;padding:4px 8px;border-radius:7px;font-size:11px;color:var(--blue);background:var(--accent-soft)}.signal-stage .icon{width:14px;height:14px}.signal-stage[data-stage=near]{color:var(--amber);background:var(--warn-bg)}.signal-stage[data-stage=confirmed]{color:var(--danger);background:var(--danger-bg)}.signal-stage[data-stage=confirmed][data-direction=long]{color:var(--green);background:var(--success-bg)}.signal-facts{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:17px 0 10px;font-size:11px;color:var(--muted)}.signal-facts>span+span::before{content:'·';margin-right:8px}.signal-card .signal-reason{font-size:14px;line-height:1.65;margin:0 0 14px;color:var(--text)}.signal-delivery{display:flex;gap:6px;align-items:center;font-size:11px;color:var(--muted)}.signal-delivery .icon{width:14px;height:14px}.signal-card .actions{border-top:1px solid var(--line);padding-top:13px;margin-top:16px;justify-content:space-between}.signal-card .actions button{font-size:12px;padding:6px 8px;background:transparent;border-color:transparent;min-height:36px;color:var(--muted)}.signal-card .actions button:hover{background:var(--panel2);color:var(--text)}.signal-card .actions a{font-size:12px}.signal-details{font-size:13px}
.compact-bots{display:grid;gap:12px;margin-top:20px}.compact-bot{display:block;padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--text)}.compact-bot:hover{border-color:var(--blue);color:var(--text)}.compact-bot-head{display:flex;align-items:center;gap:10px;margin-bottom:16px}.compact-bot-head>.icon{color:var(--blue)}.compact-bot-head strong{font-size:14px;font-weight:600;flex:1}.compact-bot-head .icon:last-child{width:16px;color:var(--muted)}.compact-bot p{font-size:12px;margin:0 0 14px}.compact-bot-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;padding-top:14px;border-top:1px solid var(--line)}.compact-bot-bottom b{font-size:19px;font-weight:600}.overview-note{display:flex;gap:10px;margin:18px 0;color:var(--muted);font-size:12px;line-height:1.7}.overview-note .icon{width:16px;margin-top:2px}.about-project{margin-top:32px}.about-project>summary{display:flex;align-items:center;gap:10px;cursor:pointer;font-weight:600;list-style:none}.about-project>summary::-webkit-details-marker{display:none}.about-project>summary .icon:last-child{margin-left:auto;transition:transform .2s}.about-project[open]>summary .icon:last-child{transform:rotate(90deg)}.about-project .landing-hero{padding:24px 0}.about-project .landing-hero h1{font-size:34px}.about-project .landing-strategy{box-shadow:none}
.bot-widget{position:relative}.bot-widget .eyebrow{display:flex;align-items:center;gap:8px;color:var(--blue)}.bot-widget h2{font-size:23px}.bot-widget .connection-status{display:inline-flex;align-items:center;gap:6px;color:var(--muted);background:var(--panel2);font-size:12px}.connection-status .icon{width:15px;height:15px}.bot-widget-meta{gap:22px}.bot-widget-meta small{font-size:11px}.bot-widget-meta b{font-weight:620}.bot-widget .actions{border-top:1px solid var(--line);padding-top:17px;margin-top:18px}.bot-widget .actions button[data-action=disconnect]{border-color:transparent;background:transparent;color:var(--muted);font-size:12px}
.profile-grid{gap:18px}.profile-grid dl{font-size:13px;row-gap:18px}.profile-grid h2{display:flex;align-items:center;gap:8px}.balance-value{font-size:40px;font-weight:600}.login-card{max-width:550px;margin:50px auto;padding:32px}.login-card .login-mark{display:grid;place-items:center;width:48px;height:48px;background:var(--accent-soft);color:var(--blue);border-radius:14px;margin-bottom:24px}.login-card .login-mark .icon{width:25px;height:25px}.login-card h1{font-size:27px}
.ema-page{--switch-off:#515963;max-width:none}.light .ema-page{--switch-off:#8e98a7}.ema-page .ema-title h1{font-size:30px}.ema-page .strategy-tabs{border:1px solid var(--line);border-radius:12px;background:var(--panel);display:inline-flex;padding:4px;gap:3px;max-width:100%;margin:22px 0 26px}.ema-page .strategy-tabs button{border:0;border-radius:8px;font-size:13px;gap:7px;padding:9px 13px;min-height:40px;background:transparent;color:var(--muted)}.ema-page .strategy-tabs button[aria-pressed=true]{background:var(--accent-soft);color:var(--blue);border:0}.ema-page .strategy-tabs .icon{width:17px;height:17px}.ema-page .shared{background:var(--panel);padding:17px 20px}.ema-page .shared-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:var(--accent-soft)}.ema-page .shared strong{font-size:13px}.ema-page .settings-card{padding:26px;margin-bottom:20px}.ema-page .section-label>span{background:var(--accent-soft);border:0;border-radius:8px;color:var(--blue);width:30px;height:30px;display:grid;place-items:center}.ema-page .section-label h2{font-size:18px}.ema-page .info{width:32px;height:32px;min-height:32px;min-width:32px;border:0;padding:6px;display:inline-grid;place-items:center;font-style:normal}.ema-page .info .icon{width:18px;height:18px}.ema-page .stage{background:var(--bg);padding:17px}.ema-page .stage label{font-size:13px}.ema-page .stage p{font-size:12px}.ema-page .field-head label{font-size:13px}.ema-page .fields{gap:26px 30px}.ema-page .field-hint,.ema-page .manual-hint{font-size:12px}.ema-page .segments button{font-size:12px;min-height:36px}.ema-page .extra-controls{transition:opacity .2s}.ema-page .switch span{width:38px;height:23px;background:var(--switch-off);transition:background-color .18s}.ema-page .switch span:after{width:17px;height:17px;top:3px;left:3px;transition:transform .18s var(--ease)}.ema-page .switch input:checked+span:after{left:3px;transform:translateX(15px)}.ema-page .save-bar{border-radius:14px;box-shadow:var(--shadow);background:var(--glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);bottom:18px;padding:16px 20px}.ema-page .save-bar strong{font-size:13px}.ema-page .save-bar small{font-size:11px}
.ema-page .watch-tools{max-width:420px}.ema-page .watch-row{border-radius:13px;padding:19px 20px;gap:20px;background:var(--panel);grid-template-columns:1fr 1.2fr auto;font-weight:400}.ema-page .watch-row:hover{background:var(--panel2)}.watch-symbol strong{display:flex;align-items:center;gap:8px}.watch-symbol strong .icon{color:var(--blue);width:18px;height:18px}.watch-action{display:flex;align-items:center;gap:5px}.watch-action .icon{width:15px;height:15px}.watch-empty,.empty-state{display:grid;justify-items:center;text-align:center;gap:10px;border:1px dashed var(--line);border-radius:14px;padding:34px 22px;background:var(--panel);color:var(--muted);font-size:13px;line-height:1.7}.empty-state>.icon{width:28px;height:28px;color:var(--blue)}.empty-state p{margin:0}.empty-state strong{color:var(--text);font-size:15px}
#watch-status{font-size:12px;color:var(--muted)}.coin-check{font-size:13px}.coin-check small,.check-result{font-size:11px}.check-result{display:flex;justify-content:flex-end;align-items:center;gap:4px}.check-result .icon{width:13px;height:13px}.ema-page .check-result.pass{color:var(--green)}.ema-page .check-result.wait{color:var(--amber)}.coin-details h2{font-size:24px}
.table-wrap{border:1px solid var(--line);border-radius:14px;background:var(--panel);margin-top:16px}td,th{padding:16px;font-size:12px}th{background:var(--panel2);color:var(--muted);font-weight:550}tbody tr:last-child td{border-bottom:0}.account-row{padding:22px}.account-row h3{display:flex;gap:8px;align-items:center}.account-row h3 .icon{color:var(--muted);width:18px}.account-row p{font-size:13px}.admin-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.admin-summary .card{margin:0}
#error,#modal-error{display:flex;align-items:center;gap:10px;background:var(--danger-bg);border:1px solid var(--danger);color:var(--text);padding:14px 18px;border-radius:12px;font-size:13px}dialog{background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:28px;max-height:calc(100dvh - 40px);overflow:auto;box-shadow:var(--shadow)}dialog::backdrop{background:#05080c99;backdrop-filter:blur(4px)}dialog h2{font-size:23px}#toast{bottom:28px;display:block;opacity:0;visibility:hidden;background:var(--panel2);color:var(--text);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:12px;transition:opacity .18s,visibility .18s;pointer-events:none}#toast.show{opacity:1;visibility:visible;display:flex;align-items:center;gap:8px}.loading-state{padding:48px 22px;text-align:center;color:var(--muted)}.loading-state>.icon{display:block;margin:0 auto 14px;color:var(--blue)}[aria-busy=true]>.icon{animation:busy-turn 1s linear infinite}@keyframes busy-turn{to{transform:rotate(360deg)}}
.live-page{max-width:1200px}.live-page>header{background:var(--glass);backdrop-filter:blur(14px);border-bottom:1px solid var(--line);padding:16px 0;position:sticky;top:0;z-index:4}.live-page>header a{display:inline-flex;gap:8px;align-items:center}.live-page #theme-toggle{width:40px;padding:0;border-radius:50%}.live-page .live-chart-card{background:var(--panel);border:1px solid var(--line);border-radius:16px;box-shadow:none}.live-page #copy-symbol{color:var(--text);font-size:30px;font-weight:650;display:inline-flex;gap:10px;align-items:center}.live-page #copy-symbol .icon{width:18px;color:var(--muted)}.live-page .chart-controls{gap:6px}.live-page .chart-controls button{font-size:12px;border-radius:9px}.live-page .chart-header h2{font-size:21px}.live-page .last-price{font-size:18px;font-weight:600}.live-page .connection{padding:14px 16px;font-size:12px}.live-page .external-links a{display:inline-flex;gap:7px;align-items:center}.live-page .chart-legend .ema-five{background:var(--blue)}.live-page .chart-legend .ema-ten{background:var(--amber)}
@media(min-width:1440px){main{padding-top:40px}.dashboard-grid{gap:28px}}
@media(max-width:1080px){.sidebar{width:196px;padding:26px 14px}.topbar{padding:0 26px}main{padding:28px 26px}.overview-item{padding:16px 14px;gap:8px}.dashboard-grid{grid-template-columns:minmax(0,1.5fr) minmax(235px,1fr);gap:18px}.signal-card{padding:18px}.signal-header{flex-wrap:wrap}.signal-stage{margin-left:52px}.ema-page .watch-row{grid-template-columns:1fr 1fr}.watch-action{grid-column:1/-1;justify-self:end}}
@media(max-width:800px){.dashboard-grid{grid-template-columns:1fr}.dashboard-aside{order:0}.compact-bots{margin-top:16px}.overview-item{align-items:flex-start}.overview-item>.icon{display:none}.overview-strip{margin-bottom:24px}.ema-page .watch-row{grid-template-columns:1fr;gap:12px}.ema-page .save-bar{bottom:18px}.ema-page .strategy-tabs button{padding:9px 11px}}
@media(max-width:700px){.sidebar{height:auto;position:static;width:100%;padding:0;border:0}.topbar{height:calc(64px + var(--tg-content-safe-area-inset-top,0px));padding:var(--tg-content-safe-area-inset-top,0px) 18px 0}.header-brand{font-size:20px}.topbar .theme-toggle{width:38px;height:38px;min-height:38px}main{padding:24px 18px 30px}.page-intro{margin-bottom:22px;align-items:flex-start}.page-intro h1,h1{font-size:28px}.page-intro p{font-size:13px}.page-intro>button{font-size:0;padding:10px}.page-intro>button .icon{width:19px;height:19px}.overview-strip{grid-template-columns:1fr}.overview-item{padding:12px 16px;align-items:center}.overview-item+.overview-item{border-left:0;border-top:1px solid var(--line)}.overview-item>.icon{display:block;width:18px}.overview-item>div{display:flex;flex:1;align-items:center;justify-content:space-between;gap:12px}.overview-item small{margin:0}.overview-item strong{font-size:12px;text-align:right}.dashboard-grid{gap:28px}.section-title h2{font-size:19px}.signal-header{flex-wrap:nowrap;gap:8px}.signal-stage{margin-left:0;font-size:10px;padding:4px 6px}.signal-stage .icon{width:12px;height:12px}.signal-card{padding:18px;border-radius:14px}.signal-card h3{font-size:18px}.coin-mark{width:34px;height:34px;border-radius:10px}.coin-mark .icon{width:18px}.signal-coin{gap:9px}.signal-source{font-size:10px}.signal-facts{font-size:10px;gap:6px}.signal-reason{font-size:13px!important}.signal-card .actions{gap:8px}.signal-card .actions a,.signal-card .actions button{font-size:11px}.signal-card .actions .icon{width:15px;height:15px}.signal-card .actions button{padding-left:0}.feed-toolbar{height:44px}.landing-hero{padding-top:16px}.landing-hero h1{font-size:36px}.landing-hero>p{font-size:15px}.landing-strategy{padding:22px}.about-project{margin-top:28px}.about-project .landing-hero h1{font-size:28px}.about-project .landing-features .card{padding:18px}.about-project .landing-section>h2{font-size:20px}.about-project.card{padding:18px}.card,.bot-widget{padding:20px}.bot-widget .actions{gap:8px}.bot-widget .actions button{font-size:12px}.bot-widget .actions a{font-size:12px}.bot-widget h2{font-size:22px}.profile-grid dd{max-width:180px}.login-card{margin:18px 0;padding:24px}.login-card h1{font-size:25px}.ema-page .ema-title h1{font-size:26px}.ema-page .intro{font-size:13px}.ema-page .strategy-tabs{display:flex;flex-wrap:nowrap;gap:2px;padding:4px}.ema-page .strategy-tabs button{flex:1;min-width:0;flex-direction:column;gap:4px;font-size:10px;padding:8px 4px}.ema-page .strategy-tabs .icon{width:18px;height:18px}.ema-page .settings-card{padding:20px 17px}.ema-page .save-bar{bottom:calc(86px + env(safe-area-inset-bottom,0px));padding:13px;gap:8px}.ema-page .save-bar button{min-height:42px}.ema-page .info{width:34px;height:34px;min-width:34px;min-height:34px}.ema-page .extra-header strong{font-size:13px}.ema-page .shared{padding:15px}.ema-page .shared-icon{flex-shrink:0}.ema-page .coin-check{font-size:12px}.ema-page .watch-row{padding:17px}.watch-tools input{font-size:16px}.live-form input,.live-form select,.ema-page .value-input input,.ema-page .field select{font-size:16px}.admin-summary{grid-template-columns:1fr}dialog{padding:24px 20px;width:calc(100% - 24px);max-height:calc(100dvh - 24px)}dialog h2{font-size:22px}#nav{position:fixed;left:10px;right:10px;bottom:calc(8px + env(safe-area-inset-bottom,0px));display:flex;gap:2px;padding:5px;background:var(--glass);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);z-index:6}#nav a{flex:1;min-width:0;min-height:55px;display:flex;flex-direction:column;justify-content:center;gap:4px;font-size:10px;padding:6px 3px;border-radius:15px}#nav a .icon{width:21px;height:21px}#nav a.active{background:var(--accent-soft)}footer{padding:20px 18px calc(105px + env(safe-area-inset-bottom,0px))}#toast{bottom:calc(95px + env(safe-area-inset-bottom,0px));max-width:calc(100% - 32px);font-size:12px}.live-page{padding:0 14px}.live-page>header{padding:14px 0}.live-page>header a{font-size:12px}.live-page .live-title{padding-top:22px}.live-page .chart-controls button{font-size:10px;padding:8px;min-height:38px}.live-page .connection{gap:10px}.live-page #copy-symbol{font-size:28px}}
@media(max-width:370px){.signal-header{flex-wrap:wrap}.signal-stage{margin-left:43px}.ema-page .strategy-tabs button{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.ema-page .strategy-tabs button>span{background:none;padding:0;margin:0;border-radius:0}
.admin-entry .primary{padding:11px 16px;border-radius:10px;min-height:44px;margin-top:6px;font-weight:550}
.ema-page .bot-preferences{max-width:none;margin-bottom:22px}.bot-preferences .section-label{margin-bottom:0}.bot-preferences .fields{gap:24px}.bot-preferences label{align-content:start}.bot-preferences small{line-height:1.65;font-weight:400}.bot-preferences .actions{margin-top:0}.bot-preferences [role=status]{font-size:12px;color:var(--green)}
@media(prefers-reduced-motion:no-preference){
  button,.primary,#nav a,.bot-widget{transition:transform 180ms var(--ease),background-color 180ms,border-color 180ms,color 180ms,box-shadow 180ms}
  button:active:not(:disabled),a.primary:active{transform:scale(.98)}
  #nav a:active{transform:scale(.97)}
  .theme-toggle:active .icon{transform:rotate(25deg)}
  .theme-toggle .icon{transition:transform 220ms var(--ease)}
  .ema-page .switch span::after{transition:transform 200ms var(--ease),left 200ms var(--ease)}
}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){.bot-widget:hover{transform:translateY(-2px);border-color:var(--blue)}.primary:hover{transform:translateY(-1px)}}

/* Compact strategy catalog: one primary action, controls in a disclosure. */
.bot-catalog{grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr));align-items:start}
.bot-card{position:relative;padding:22px;min-width:0}.bot-card:hover{transform:none!important;border-color:var(--line)}.bot-card:has(.bot-management[open]){z-index:3}
.bot-card-header{display:flex;align-items:center;gap:10px}.bot-card-header h2{font-size:22px;line-height:1.2;margin:0 auto 0 0;min-width:0}.bot-card-header h2 a{color:var(--text)}
.bot-status{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:550;color:var(--amber);white-space:nowrap}.bot-status[data-state=live]{color:var(--green)}.bot-status[data-state=down]{color:var(--danger)}.bot-status[data-state=paused]{color:var(--muted)}.status-dot{width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0}
.bot-management{position:relative;flex-shrink:0}.bot-management summary{list-style:none;display:flex;align-items:center;justify-content:center;width:40px;height:40px;cursor:pointer;border-radius:10px;color:var(--muted)}.bot-management summary::-webkit-details-marker{display:none}.bot-management summary:hover,.bot-management[open] summary{background:var(--panel2);color:var(--text)}
.bot-management-panel{position:absolute;right:0;top:calc(100% + 6px);width:260px;max-width:calc(100vw - 72px);padding:6px;background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:12px;z-index:3}.bot-management-panel button{display:flex;width:100%;justify-content:flex-start;text-align:left;min-height:44px;background:transparent;border-color:transparent;font-size:12px;padding:10px}.bot-management-panel button:hover{background:var(--panel2);border-color:transparent}.bot-management-panel button[data-action=disconnect]{color:var(--danger)}
.bot-card-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.bot-card-tags span{font-size:10px;font-weight:500;color:var(--muted);border:1px solid var(--line);border-radius:6px;padding:3px 7px;line-height:1.4}
.bot-card .bot-card-description{font-size:13px;line-height:1.6;margin:14px 0 0;max-width:36ch}.bot-card-count{display:flex;align-items:center;gap:12px;margin:20px 0}.bot-card-count strong{font-size:38px;font-weight:650;letter-spacing:-1.5px;line-height:1}.bot-card-count span{font-size:12px;line-height:1.45;color:var(--muted)}.bot-card-count>.icon{margin-left:auto;color:var(--muted);opacity:.65;width:28px;height:28px}.bot-card .bot-card-note{font-size:12px;margin:-6px 0 16px}
.bot-card-actions{display:flex;align-items:center;gap:12px;padding-top:16px;border-top:1px solid var(--line)}.bot-card-actions a{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;font-size:12px;white-space:nowrap;border-radius:10px}.bot-card-actions .primary{flex:1;padding:10px 12px}.bot-card-actions .primary .icon{width:17px;height:17px}.bot-card-actions .bot-settings-link{padding:10px 4px;color:var(--muted)}.bot-settings-link:hover{color:var(--blue)}.bot-settings-link .icon{width:17px;height:17px}
@media(max-width:400px){.bot-card{padding:18px}.bot-card-header{gap:7px}.bot-card-header h2{font-size:20px}.bot-status{font-size:10px}.bot-management summary{width:36px;min-height:40px}.bot-card-actions{gap:10px}}

/* EMA settings: one form, compact mobile hierarchy and deliberate save state. */
.ema-page .ema-title{margin-top:6px}.ema-page .ema-title h1{font-size:28px;line-height:1.2;overflow-wrap:anywhere;margin:10px 0 8px}.ema-page .intro{margin-bottom:12px}.ema-page .strategy-tabs{margin:16px 0 18px}.ema-status{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;font-size:12px;color:var(--muted);min-height:24px}.ema-status>span{display:inline-flex;align-items:center;gap:6px}.ema-status .icon{width:16px;height:16px}
.ema-page .sync-line{display:flex;gap:8px;align-items:flex-start;font-size:12px;line-height:1.5;color:var(--muted);margin:0 0 14px}.sync-line .icon{width:16px;height:16px;flex-shrink:0;margin-top:1px}.ema-page .settings-card{padding:20px;margin-bottom:16px}.ema-page .section-label{margin-bottom:16px;gap:10px}.ema-page .section-label h2{font-size:19px;line-height:1.3}.ema-page .section-label p{font-size:13px;line-height:1.5}.ema-page .bot-preferences .section-label{margin-bottom:16px}.ema-page .bot-preferences .field>label{display:block;margin-bottom:8px;font-size:14px;font-weight:550}.ema-page .bot-preferences .field-hint{font-size:13px;line-height:1.55;margin-top:8px}.ema-page .field-head{margin-bottom:4px}.ema-page .field-head label{font-size:14px}.ema-page .field-hint,.ema-page .manual-hint{font-size:12px;line-height:1.5}.ema-page .info{width:44px;height:44px;min-width:44px;min-height:44px;border:0;display:inline-flex;align-items:center;justify-content:center}.ema-page .info .icon{width:18px;height:18px}.ema-page .segments[data-presets] button{display:flex;flex-direction:column;align-items:center;gap:3px;min-height:54px;font-size:12px}.ema-page .segments[data-presets] b{font-size:13px;font-weight:600}.ema-page .custom-label{float:none;display:block;text-align:right;font-size:12px}.ema-page .custom-label:empty{display:none}.ema-page .stage label{min-height:44px}.ema-page .stage label b{font-size:14px}.ema-page .stage p{font-size:12px;margin-top:6px}.ema-page .extra-header .switch{min-height:44px}.ema-page .extra-controls[hidden],.ema-page .save-bar[hidden],.ema-page .inline-note[hidden]{display:none!important}.ema-page .extra>p{margin:4px 0 12px;font-size:13px}.ema-page .inline-note{font-size:12px}.ema-page #sync-conflict{margin:0 0 16px}.ema-page #sync-conflict p{margin:0 0 8px}.ema-page #sync-conflict small{display:block;margin-top:6px}.ema-page .settings-summary summary{font-weight:600;cursor:pointer;min-height:28px;font-size:15px}.ema-page .settings-summary p,.ema-page .settings-summary li{font-size:13px;line-height:1.65}.ema-page .settings-summary ul{padding-left:20px;margin-bottom:0}.ema-page .settings-summary li+li{margin-top:6px}.ema-page #summary-mode{color:var(--muted)}.ema-page #saved-status{font-size:12px;color:var(--muted);margin:12px 0}.ema-page #form-error:empty{display:none}.ema-page #form-error:not(:empty){background:var(--panel);padding:14px;border:1px solid var(--danger);border-radius:12px;margin-bottom:12px}.ema-page .save-bar{display:flex;flex-wrap:wrap;gap:8px;padding:12px 16px;bottom:16px}.ema-page .save-bar>strong{flex:1;font-size:12px}.ema-page .save-actions{display:flex;gap:8px;margin:0}.ema-page .save-actions button{min-height:44px}.ema-page .save-actions .ghost{color:var(--muted)}.ema-page input,.ema-page select{scroll-margin-top:110px;scroll-margin-bottom:240px}.ema-page .range-control input{min-height:28px}.ema-page .value-input:focus-within{outline:2px solid var(--blue);outline-offset:2px}.ema-page .field select:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
@media(max-width:700px){
 main:has(.ema-page){padding:16px 14px 24px}.ema-page .ema-title h1{font-size:24px;letter-spacing:-.7px}.ema-page .intro{font-size:13px;line-height:1.5;margin-bottom:10px}.ema-page .settings-card{padding:16px}.ema-page .fields{gap:18px}.ema-page .strategy-tabs{margin:14px 0}.ema-page .strategy-tabs button{min-height:54px}.ema-page .section-label h2{font-size:18px}.ema-page .stage{padding:10px 12px}.ema-page .save-bar{bottom:calc(82px + env(safe-area-inset-bottom,0px));padding:10px;gap:8px}.ema-page .save-bar>strong{flex-basis:100%}.ema-page .save-actions{width:100%;flex-basis:100%}.ema-page .save-actions button{padding:9px 10px;white-space:normal;line-height:1.3;font-size:12px}.ema-page .save-actions .primary{flex:1}.ema-page .save-actions .ghost{flex:0 1 42%}.ema-page .extra-controls{gap:10px}.ema-page .extra-controls .segments button{font-size:12px}.ema-page .settings-summary summary{font-size:14px}
 dialog:has(.ema-help){position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;max-height:85dvh;border-radius:22px 22px 0 0;padding:24px 20px calc(20px + env(safe-area-inset-bottom,0px));box-sizing:border-box}dialog:has(.ema-help) .actions button{width:100%;min-height:44px}.ema-help h2{font-size:22px}.ema-help p{font-size:15px}
 body.ema-keyboard #nav{display:none}body.ema-keyboard .ema-page .save-bar{position:static}body.ema-keyboard .topbar{position:static}
}

/* A numeric value and its unit share one focus ring around the full control. */
.ema-page .value-input input:focus,
.ema-page .value-input input:focus-visible{outline:none;box-shadow:none}
.ema-page .value-input input[type=number]{appearance:textfield;-moz-appearance:textfield}
.ema-page .value-input input[type=number]::-webkit-inner-spin-button,
.ema-page .value-input input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
/* Observation list: a count on the tab, compact facts and explicit blockers. */
.ema-page .strategy-tabs button{position:relative}
.ema-page .strategy-tabs button>span:not(.watch-count){padding:0;margin:0;background:none}
.ema-page .strategy-tabs .watch-count{display:inline-flex;align-items:center;justify-content:center;min-width:23px;height:21px;padding:0 6px;margin:0;border-radius:7px;background:var(--accent-soft);color:var(--blue);font-size:11px;font-weight:650;font-variant-numeric:tabular-nums}
.ema-page .strategy-tabs button[aria-pressed=true] .watch-count{background:var(--blue);color:#fff}
.ema-page .strategy-tabs .watch-count[data-stale=true]{opacity:.65}
.ema-page #watch-status{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;line-height:1.6}
.ema-page .watch-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ema-page .watch-symbol strong{font-size:15px}
.ema-page .watch-symbol small{font-size:12px;line-height:1.6;margin-top:7px;color:var(--muted)}
.ema-page .watch-stage{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:500;color:var(--muted)}
.ema-page .watch-stage::before{content:'';width:6px;height:6px;border-radius:50%;background:#e1b736;flex-shrink:0}
.ema-page .watch-stage[data-stage=early]::before{background:#e98d3d}
.ema-page .watch-stage[data-stage=confirmed]::before{background:var(--green)}
.ema-page .watch-row{grid-template-columns:minmax(220px,1.3fr) minmax(180px,1fr) auto;gap:18px}
.ema-page .watch-state small{font-size:12px;margin:0;color:var(--muted)}
.ema-page .watch-reason-label{color:var(--text)}
.ema-page .watch-state:empty{display:none}
.ema-page .watch-action{margin-left:auto;white-space:nowrap}
.ema-page .watch-row:not(:has(.watch-state small)){grid-template-columns:1fr auto}
@media(max-width:800px){
 .ema-page .watch-row,.ema-page .watch-row:not(:has(.watch-state small)){grid-template-columns:1fr;gap:10px}
 .ema-page .watch-action{justify-self:end}
}
@media(max-width:700px){
 .ema-page .strategy-tabs .watch-count{position:absolute;right:4px;top:4px;min-width:20px;height:18px;font-size:10px;padding:0 4px}
}
/* The header/footer remain reachable while only modal content scrolls. */
#modal{padding:0;overflow:hidden;max-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - var(--tg-content-safe-area-inset-top,0px));overscroll-behavior:contain}
#modal[open]{display:flex;flex-direction:column}
#modal .modal-head{display:flex;justify-content:flex-end;flex:none;padding:6px 8px 0}
#modal .modal-cross{display:grid;place-items:center;min-width:44px;min-height:44px;padding:10px;border:0;background:transparent;color:var(--muted)}
#modal .modal-cross:hover{background:var(--accent-soft);color:var(--blue)}
#modal .modal-body{overflow:auto;min-height:0;padding:0 24px 22px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#modal .modal-footer{flex:none;padding:12px 24px;border-top:1px solid var(--line);background:var(--panel)}
#modal .modal-footer button{width:100%;min-height:44px}
@media(max-width:700px){#modal .modal-body{padding:0 18px 18px}#modal .modal-footer{padding:10px 18px}}

.ema-page .watch-symbol small{display:block}.ema-page .watch-symbol small+small{margin-top:2px}
.ema-page .watch-state small{display:block}.ema-page .watch-state small+small{margin-top:7px}
#modal.modal-footer-only .modal-body{padding-top:24px}
.watch-navigation{display:grid;gap:8px;margin:22px 0 16px}
.watch-navigation>div{display:flex;gap:8px}
.watch-navigation button,.watch-navigation a{display:flex;flex:1;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:44px;padding:10px 8px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);color:var(--text);font-size:13px;text-align:center}
.watch-navigation button:hover,.watch-navigation a:hover{border-color:var(--blue);color:var(--blue)}
.watch-navigation .icon{width:17px;height:17px;flex:none}

.ema-page .watch-exchange{display:inline;font-size:11px;font-weight:400;letter-spacing:0;color:var(--muted);margin-left:6px;white-space:nowrap}
.coin-details h2 .watch-exchange{font-size:13px;vertical-align:middle}
#modal.modal-footer-only h2:focus{outline:none}
#modal.modal-footer-only .modal-footer button{border-color:transparent;box-shadow:none}
#modal.modal-footer-only .modal-footer button:focus{outline:none}
#modal.modal-footer-only .modal-footer button:focus-visible{background:var(--accent-soft);color:var(--text)}
