/* SwingVault app shell — mobile-native + desktop pro polish (loads after inline styles) */

/* ── Desktop: pro tool chrome ── */
@media (min-width: 901px) {
  .hdr {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(14, 18, 21, 0.92);
    box-shadow: 0 1px 0 rgba(200, 164, 90, 0.08);
  }
  .toolbar {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .pan {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 8px 32px rgba(0, 0, 0, 0.35);
  }
  .side {
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.25);
  }
}

/* ── Mobile: native app feel (not a website) ── */
@media (max-width: 600px) {
  html,
  body {
    -webkit-text-size-adjust: 100%;
  }
  .app {
    background: var(--bg);
  }
  .hdr {
    padding-top: max(8px, env(safe-area-inset-top, 0px));
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
    background: linear-gradient(180deg, #0e1215 0%, #0a0d10 100%);
    border-bottom: 1px solid rgba(200, 164, 90, 0.12);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  }
  .brand {
    font-size: 20px;
    letter-spacing: 2.5px;
  }
  /* Never crush header buttons to unreadable size */
  .hbtn {
    font-size: 11px !important;
    padding: 8px 12px !important;
    min-height: 36px;
    border-radius: 20px;
  }
  .hbtn.gold {
    box-shadow: 0 2px 12px rgba(200, 164, 90, 0.25);
  }
  #sidebar-toggle {
    min-width: 44px;
    min-height: 44px;
    font-size: 18px !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .toolbar {
    background: #0c1013;
    border-bottom-color: rgba(255, 255, 255, 0.04);
  }
  .tb,
  .spd-btn {
    min-height: 36px;
    padding: 8px 12px !important;
  }
  .pan {
    border-radius: 10px;
    border-color: rgba(255, 255, 255, 0.06);
  }
  .mob-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    height: calc(52px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: linear-gradient(180deg, #12171b 0%, #0a0d10 100%);
    border-top: 1px solid rgba(200, 164, 90, 0.2);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55);
  }
  .mob-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: none;
    background: transparent;
    color: var(--mut, #6a7a88);
    font-family: var(--mono, monospace);
    font-size: 9px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    min-height: 52px;
    padding: 4px 2px;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-tab-ic {
    font-size: 18px;
    line-height: 1;
    opacity: 0.75;
  }
  .mob-tab.on {
    color: var(--acc, #c8a45a);
  }
  .mob-tab.on .mob-tab-ic {
    opacity: 1;
  }
  .mob-tab:active {
    background: rgba(255, 255, 255, 0.04);
  }
  .mob-panel .nb-entry {
    margin-bottom: 8px;
  }
  .mob-sheet-ov.open .mob-sheet {
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.55);
  }
  .mob-acct .hbtn {
    width: 100%;
    justify-content: center;
    padding: 12px;
  }
  :root {
    --acc: #c8a45a;
  }
  .side {
    height: auto !important;
    max-height: none !important;
    padding-bottom: 0;
    border-top: none;
  }
  .sheet-grip {
    display: none !important;
  }
  .toast {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    font-size: 12px;
    padding: 10px 18px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  }
  .dz {
    border-radius: 8px;
    margin: 6px;
    inset: 6px;
    border: 1px dashed rgba(200, 164, 90, 0.25);
    background: rgba(7, 8, 9, 0.85);
  }
  .dz-t {
    font-size: 13px;
    letter-spacing: 1.5px;
  }
}

@media (max-width: 400px) {
  .hbtn {
    font-size: 10px !important;
    padding: 7px 10px !important;
  }
}

/* PWA standalone — full-screen app, no browser chrome feel */
@media (display-mode: standalone) {
  .hdr {
    padding-top: max(10px, env(safe-area-inset-top, 0px));
  }
  .toast {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Update / changelog (login + app) ── */
.upd-ov,
.ov#clModal {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.upd-box {
  border: 1px solid rgba(200, 164, 90, 0.22) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
}

.upd-head h3,
.nb-head h3 {
  letter-spacing: 2px;
}

.upd-continue,
.upd-foot .upd-continue {
  box-shadow: 0 4px 16px rgba(200, 164, 90, 0.2);
}

.sv-cl-block {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sv-cl-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.sv-cl-ver {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: #c8a45a;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.sv-cl-item {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.45;
  color: #b8c8d4;
}
.sv-cl-dot {
  color: #c8a45a;
  flex-shrink: 0;
  margin-top: 1px;
}
.sv-cl-badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #3dd68c;
  background: rgba(61, 214, 140, 0.12);
  border: 1px solid rgba(61, 214, 140, 0.25);
  border-radius: 10px;
  padding: 4px 10px;
  margin-bottom: 14px;
  font-family: 'Bebas Neue', Impact, sans-serif;
}

#cl-body {
  padding: 20px 22px 24px !important;
}
