/* syut.in — Phone & Web Client Layout (Liquid Glassmorphic Light System) */

/* Persistent brand bar + connection status (shown on every screen, works offline) */
.brandbar {
  position: sticky;
  top: 0;
  z-index: 45;
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(10px + var(--sat)) 18px 10px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(186, 230, 253, 0.6);
}
.bb-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.bb-word { font-family: 'Orbitron', var(--font-display); font-weight: 800; font-size: 18px; color: #031747; letter-spacing: -0.01em; }
.bb-word i { font-style: normal; color: #009fe3; }
.bb-conn {
  display: inline-flex; align-items: center; gap: 7px;
  max-width: 62%;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #f8fafc;
  color: #334155;
  font: 600 12px/1.2 var(--font-tech);
  cursor: pointer;
}
.bb-conn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-conn i { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; flex: none; }
.bb-conn.ok { background: #ecfdf5; border-color: rgba(5, 150, 105, 0.35); color: #047857; }
.bb-conn.ok i { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
.bb-conn.bad { background: #fff1f2; border-color: rgba(225, 29, 72, 0.35); color: #be123c; }
.bb-conn.bad i { background: #e11d48; animation: bbPulse 1.4s ease-in-out infinite; }
.bb-conn.busy i { background: #f59e0b; animation: bbPulse 1s ease-in-out infinite; }
@keyframes bbPulse { 50% { opacity: .35; } }
.home-save {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 14px; padding: 13px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border: 1px solid rgba(2, 132, 199, 0.25);
}
.home-save b { color: #031747; }
.home-save .grow { flex: 1; font-size: 12.5px; line-height: 1.4; color: #334155; }
#app {
  max-width: 580px;
  margin: 0 auto;
  padding: 14px 18px calc(115px + var(--sab));
  min-height: 100vh;
}
.boot {
  min-height: 80vh;
  display: grid;
  place-items: center;
}

/* Top App Bar */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 2px 20px;
}
.top h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand .logo {
  height: 36px;
  width: auto;
  min-width: 110px;
  background: url(/logo.svg) left center / contain no-repeat !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Liquid Glass Tab Bar */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + var(--sab));
  z-index: 40;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  width: min(440px, calc(100% - 24px));
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1.5px solid rgba(186, 230, 253, 0.9) !important;
  box-shadow: 0 14px 35px -8px rgba(2, 132, 199, 0.18), 0 20px 45px -15px rgba(3, 23, 71, 0.08) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.tabbar button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--dim) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 6px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color .2s, background .25s var(--ease), transform .3s var(--spring);
}
.tabbar button:hover {
  color: var(--navy-900) !important;
}
.tabbar button:active {
  transform: scale(.92);
}
.tabbar button.on {
  color: var(--navy-900) !important;
  background: #e0f2fe !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 8px rgba(2, 132, 199, 0.12) !important;
}
.tabbar svg.i {
  width: 22px;
  height: 22px;
}

/* Hero & Main Action Card */
.hero {
  text-align: center;
  padding: 26px 20px 22px;
}
.hero h2 {
  font-size: 23px;
  font-weight: 800;
  color: var(--navy-900);
  margin-top: 10px;
}
.hero p {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--muted);
}
.actions {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

/* Storage Stats Grid */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.stat {
  padding: 14px 10px;
  border-radius: var(--r-md);
  background: #f0f9ff !important;
  border: 1px solid #bae6fd !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.05) !important;
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--navy-900) !important;
}
.stat span {
  font-size: 12px;
  color: var(--dim) !important;
  font-weight: 650;
  margin-top: 2px;
  display: block;
}

/* Upload Queue Items */
.q-item .bar {
  height: 6px;
  margin-top: 8px;
}
.q-status {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.q-status.ok { color: var(--ok); }
.q-status.bad { color: var(--bad); }
.q-status.skip { color: var(--dim); }

/* Banners (Warning, Info, Alert) */
.banner {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-radius: var(--r-md);
  margin-bottom: 16px;
  background: #fef3c7 !important;
  border: 1.5px solid #fde68a !important;
  color: #92400e !important;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.08);
}
.banner.info {
  background: #e0f2fe !important;
  border: 1.5px solid #bae6fd !important;
  color: #0369a1 !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.08);
}
.banner.bad {
  background: #ffe4e6 !important;
  border: 1.5px solid #fecdd3 !important;
  color: #be123c !important;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.08);
}

/* Onboarding & Welcome */
.onb {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.onb h1 {
  font-size: 34px;
  font-weight: 850;
  line-height: 1.12;
  color: var(--navy-900);
}
.onb .lead {
  font-size: 16.5px;
  color: var(--muted);
  line-height: 1.55;
}
.feat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feat .fi {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  flex: none;
  display: grid;
  place-items: center;
  background: #e0f2fe;
  border: 1.5px solid #bae6fd;
  color: var(--cloud-500);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}
.feat b {
  display: block;
  font-size: 15.5px;
  font-weight: 750;
  color: var(--navy-900);
}
.feat span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}
.steps-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.steps-dots i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--cloud-200);
  transition: width .4s var(--ease), background .4s;
}
.steps-dots i.on {
  width: 24px;
  background: var(--cloud-500);
}

/* Pairing PIN Inputs (Light Glass & High Contrast) */
.pin {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.pin input {
  width: 48px;
  height: 60px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  border-radius: 16px;
  padding: 0;
  border: 1.5px solid #bae6fd !important;
  background: #ffffff !important;
  color: var(--navy-900) !important;
  outline: none;
  caret-color: var(--cloud-500);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.08);
  transition: border-color .2s, box-shadow .2s, transform .3s var(--spring);
}
.pin input:focus {
  border-color: var(--cloud-500) !important;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2) !important;
  transform: translateY(-2px);
}
.pin.shake {
  animation: shake .45s;
}
@keyframes shake {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* Step Guides */
.howto {
  counter-reset: s;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.howto li {
  counter-increment: s;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}
.howto li::before {
  content: counter(s);
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 750;
  background: #e0f2fe;
  color: var(--navy-900);
  border: 1px solid #bae6fd;
}

/* Thumbnails & Library */
.grid-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  border-radius: var(--r-md);
  overflow: hidden;
}
.grid-thumbs div {
  aspect-ratio: 1;
  background: #f1f5f9 center/cover;
  border: 1px solid var(--cloud-100);
}

.big-num {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--navy-900);
}
.section-gap { height: 16px; }

.li.tap {
  cursor: pointer;
  border-radius: 14px;
  padding: 10px 12px;
  transition: background .2s;
}
.li.tap:active {
  background: var(--cloud-100);
}
.preview {
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  border-radius: var(--r-md);
  background: #f8fafc;
  border: 1px solid var(--cloud-200);
}
.kv {
  display: flex;
  flex-direction: column;
}
.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--cloud-100);
  font-size: 14px;
}
.kv > div:first-child { border-top: 0; }
.kv span { color: var(--dim); flex: none; font-weight: 600; }
.kv b { font-weight: 700; text-align: right; min-width: 0; color: var(--ink); }
details summary { cursor: pointer; color: var(--navy-900); font-weight: 650; }
body.dropping #app {
  outline: 2.5px dashed var(--cloud-500);
  outline-offset: -8px;
  border-radius: 28px;
}
