* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --blue:#3b93ff; --dark:#1c1c1c; --gray:#9aa0a8; --bg:#ecf1f4; }
html, body { height: 100%; }
body {
  font-family: 'Oswald', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--dark);
}
input { font-family: 'Oswald', sans-serif; }

/* Desktop preview frame. Inside Telegram the WebView is already phone-sized,
   so we drop the bezel and let the app fill the screen (see app.js body class). */
#frame {
  min-height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% 0%, #d7deea 0%, #b9c4d2 100%);
}
#device {
  width: 390px; height: 844px; background: var(--bg);
  border-radius: 46px; position: relative; overflow: hidden;
  box-shadow: 0 40px 80px -20px rgba(28,40,60,.45), 0 0 0 11px #1c1c22, 0 0 0 13px #34343c;
  display: flex; flex-direction: column;
}
body.tg #frame { padding: 0; min-height: 100vh; background: var(--bg); }
body.tg #device {
  width: 100%; height: 100vh; border-radius: 0; box-shadow: none;
}

#app { position: absolute; left: 0; right: 0; top: 0; bottom: 0; overflow: hidden; }
body.tg #app { top: 0; }

.noscroll { scrollbar-width: none; -ms-overflow-style: none; }
.noscroll::-webkit-scrollbar { display: none; width: 0; height: 0; }

.screen { height: 100%; display: flex; flex-direction: column; animation: screenIn .25s ease; }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%,10px); } to { opacity: 1; transform: translate(-50%,0); } }

#toast {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: #1c1c1c; color: #fff; padding: 11px 20px; border-radius: 14px;
  font-size: 13.5px; font-weight: 500; z-index: 60; white-space: nowrap;
  box-shadow: 0 10px 24px rgba(28,28,28,.35); animation: toastIn .25s ease;
}
.hidden { display: none !important; }

#nav {
  position: absolute; left: 0; right: 0; bottom: 0; height: 84px; background: #fff;
  border-top: 1px solid rgba(28,28,28,.05); display: flex; align-items: flex-start;
  justify-content: space-around; padding-top: 12px; box-shadow: 0 -6px 20px rgba(28,28,28,.04); z-index: 40;
}
#nav button { background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; font-family: inherit; }
#nav span { font-size: 10px; font-weight: 600; letter-spacing: .4px; }

.statusbar { height: 50px; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 30px 6px; flex: none; position: relative; z-index: 5; }
body.tg .statusbar { display: none; }

button { font-family: inherit; }
.spinner { width: 26px; height: 26px; border: 3px solid #d7dee6; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* sticky "add to slip" CTA above the nav */
#cta {
  position: absolute; left: 12px; right: 12px; bottom: 96px; z-index: 55;
  background: #1c1c1c; border-radius: 18px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 14px 32px rgba(28,28,28,.4); animation: ctaUp .28s ease;
}
@keyframes ctaUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
#toast { bottom: 170px; }
