:root{
  --mobile-bg-top:#0e0b22;
  --mobile-bg-bottom:#19304a;
}

body{
  background:
    radial-gradient(900px 500px at 15% 5%, rgba(96,165,250,.18), transparent 60%),
    radial-gradient(900px 500px at 85% 10%, rgba(221,194,11,.14), transparent 60%),
    var(--mobile-bg-top);
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 60;
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin: 0 0 12px;
  padding-top: 30px;
  padding-bottom: 10px;
}

.brand{
  display:flex;
  flex-direction:column;
  line-height:1.05;
}

.brand .title{
  font-weight:700;
  letter-spacing:.2px;
  font-size:16px;
}

.brand .subtitle{
  font-size:12px;
  color:var(--muted2);
  margin-top:4px;
}

.icon-btn{
  width:40px;
  height:40px;
  border-radius:0;
  background: var(--icon-btn-bg, rgba(255,255,255,.06));
  border: 1px solid var(--icon-btn-border, var(--line2));
  display:grid;
  place-items:center;
  box-shadow: var(--shadow);
  user-select:none;
}

.section{
  background: var(--section-bg, var(--nav-item-bg, rgba(255,255,255,.03)));
  border: 1px solid var(--section-border, var(--line));
  box-shadow: var(--section-shadow, var(--shadow));
  padding: 14px;
  display: grid;
  gap: 12px;
}

.section h2{
  margin: 0;
  font-size: calc(13px * var(--font-scale, 1));
  text-transform: uppercase;
  letter-spacing: .08em;
}

.pill{
  padding: 12px;
  border-radius: 0;
  background: var(--pill-bg, var(--panel2, rgba(255,255,255,.06)));
  border: 1px solid var(--pill-border, var(--line2));
  color: var(--pill-color, var(--muted));
  font-size: calc(13px * var(--font-scale, 1));
  min-width: 90px;
  text-align:center;
  user-select:none;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

.input{
  width:100%;
  padding:10px 12px;
  border-radius: 0;
  border: 1px solid var(--input-border, var(--line2));
  background: var(--input-bg, var(--panel2, rgba(255,255,255,.04)));
  color: var(--input-color, var(--text));
  font-size: calc(13px * var(--font-scale, 1));
  outline:none;
}

.btn{
  width:100%;
  padding:10px 12px;
  border-radius:0;
  border:1px solid var(--btn-border, var(--line2));
  background: var(--btn-bg, rgba(255,255,255,.06));
  color: var(--btn-color, var(--text));
  font-weight:700;
  font-size:calc(13px * var(--font-scale, 1));
  cursor:pointer;
}

.btn.primary{
  background: var(--accent);
  color:#0e0b22;
  border-color: var(--accent);
}

.btn.ghost{
  background: var(--btn-ghost-bg, var(--nav-item-bg, rgba(255,255,255,.03)));
  color: var(--btn-ghost-color, var(--muted));
}

.btn:disabled{
  opacity:.55;
  cursor:default;
}

.overlay{
  position: fixed;
  inset: 0;
  background: var(--overlay-bg, rgba(0,0,0,.75));
  display:none;
  align-items:flex-end;
  justify-content:center;
  z-index: 100;
  padding: 14px;
}

.overlay.on{ display:flex; }

.sheet{
  width: min(430px, 100%);
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--sheet-bg, var(--nav-item-bg, rgba(18, 22, 38, .92)));
  box-shadow: 0 20px 70px rgba(0,0,0,.65);
  overflow:hidden;
}

.sheet-head{
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background: var(--sheet-head-bg, rgba(18, 22, 38, .75));
}

.sheet-title{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}

.sheet-title .t{
  font-weight:800;
  font-size:14px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.sheet-body{
  padding: 14px;
  display:grid;
  gap:12px;
  background: var(--sheet-body-bg, rgba(18, 22, 38, .75));
}

.sheet-actions{
  display:flex;
  gap:10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--sheet-actions-bg, var(--panel));
}

.sheet-title .s{
  font-size:12px;
  color: var(--sheet-subtitle, var(--muted2));
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.x{
  width:38px;
  height:38px;
  border-radius:0;
  border:1px solid var(--line2);
  background: var(--x-bg, var(--nav-item-bg, rgba(255,255,255,.03)));
  color: var(--text);
  font-size: calc(16px * var(--font-scale, 1));
  cursor:pointer;
}

.card{
  background: var(--card-bg, var(--nav-item-bg, rgba(255,255,255,.03)));
  border: 1px solid var(--card-border, var(--line));
  border-radius: var(--card-radius, var(--radius, 0));
  box-shadow: var(--card-shadow, var(--shadow));
  overflow:hidden;
}

.card-header{
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--card-header-border, var(--line));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background: var(--card-header-bg, rgba(255,255,255,.02));
}

.bottom-nav .nav-item.active .ni,
.bottom-nav .nav-btn.primary .ni{
  border-color: #000000 !important;
}

.bottom-nav .nav-item .ni,
.bottom-nav .nav-btn .ni{
  border: none !important;
}

.bottom-nav .nav-item.active,
.bottom-nav .nav-btn.primary{
  color: #000000 !important;
}

.bottom-nav .nav-item.active .ni svg,
.bottom-nav .nav-btn.primary .ni svg{
  stroke: #000000 !important;
}

.bottom-nav .nav-item:hover,
.bottom-nav .nav-btn:hover,
.bottom-nav .nav-item:focus-visible,
.bottom-nav .nav-btn:focus-visible{
  background: inherit !important;
  color: inherit !important;
}

.bottom-nav .ni .ni-glyph{
  width: 14px;
  height: 14px;
  display: block;
  background-color: currentColor;
  -webkit-mask-image: var(--ni-mask);
  mask-image: var(--ni-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.mobile-loader{
  border:1px solid var(--line2);
  background: var(--nav-item-bg, rgba(255,255,255,.03));
  padding:12px;
  display:flex;
  align-items:center;
  gap:10px;
  font-size: calc(13px * var(--font-scale, 1));
  color:var(--muted2);
}

.mobile-loader-spinner{
  width:16px;
  height:16px;
  border:2px solid rgba(255,255,255,.25);
  border-top-color: var(--accent);
  border-radius:50%;
  animation: mobile-spin .8s linear infinite;
  flex: 0 0 auto;
}

@keyframes mobile-spin {
  to { transform: rotate(360deg); }
}

/* Prevent iOS Safari/WebView auto-zoom on focused form fields. */
@supports (-webkit-touch-callout: none) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}
