/* Shooree mobile app shell */
:root {
  --bg: #0b1210;
  --elevated: #121a17;
  --ink: #f4f1ea;
  --muted: #a8b3ad;
  --accent: #7cffb2;
  --line: rgba(244, 241, 234, 0.12);
  --danger: #ff7b7b;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --max: 920px;
  --phone: 430px;
  --tab-h: calc(64px + env(safe-area-inset-bottom, 0px));
  --top-h: 56px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(700px 420px at 80% -8%, rgba(124,255,178,.14), transparent 55%),
    radial-gradient(500px 300px at 10% 100%, rgba(124,255,178,.06), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.03em; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.badge {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Desktop phone frame */
.app-stage {
  min-height: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
}
.app-phone {
  width: min(100%, var(--phone));
  min-height: 100vh;
  min-height: 100dvh;
  background: rgba(11,18,16,.72);
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  position: relative;
  display: flex;
  flex-direction: column;
}
@media (min-width: 480px) {
  .app-phone {
    border-color: var(--line);
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
    margin: 12px 0;
    min-height: calc(100vh - 24px);
    border-radius: 24px;
    overflow: hidden;
  }
  body { padding: 0 12px; }
}

.app-top {
  height: var(--top-h);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(11,18,16,.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 700; }
.brand-mark { width: .7rem; height: .7rem; border-radius: 999px; background: var(--accent); }

.app-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1rem calc(var(--tab-h) + 1rem);
}

.tab-panel[hidden] { display: none !important; }

.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(100%, var(--phone));
  height: var(--tab-h);
  padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .15rem;
  background: rgba(12, 18, 16, .94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
  z-index: 30;
}
@media (min-width: 480px) {
  .tabbar {
    bottom: 12px;
    border-radius: 0 0 24px 24px;
  }
}
.tab-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  padding: .35rem .2rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 600;
  border-radius: 10px;
}
.tab-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.tab-btn.active { color: var(--accent); background: rgba(124,255,178,.08); }

.card {
  background: var(--elevated);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin: .75rem 0;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 10px;
  padding: .75rem 1.05rem; font-family: var(--font-display); font-weight: 600;
  cursor: pointer; background: var(--accent); color: #062015;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: .55rem .85rem; font-size: .9rem; }
.btn-block { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.stack { display: grid; gap: .7rem; }
.error { color: var(--danger); margin-top: .75rem; }
.ok { color: var(--accent); margin-top: .75rem; }

label { display: block; font-size: .88rem; color: var(--muted); margin: .75rem 0 .3rem; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(244,241,234,.03);
  color: var(--ink);
  padding: .85rem 1rem;
}
input:focus, textarea:focus { outline: none; border-color: rgba(124,255,178,.55); }

.hero-greet h1 { font-size: 1.75rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: .88rem;
  background: rgba(124,255,178,.06);
}

.rail {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  padding: .25rem 0 .5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
.rail-card {
  flex: 0 0 72%;
  scroll-snap-align: start;
  background: var(--elevated);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  min-height: 120px;
}
.rail-card .price { color: var(--accent); font-family: var(--font-display); font-weight: 700; margin-top: .35rem; }
.rail-card .biz { color: var(--muted); font-size: .85rem; margin-top: .35rem; }

.product-card {
  display: grid;
  gap: .35rem;
  background: var(--elevated);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: .75rem;
  transition: border-color .2s ease, transform .2s ease;
}
.product-card:active { transform: scale(.985); }
.product-card .price { color: var(--accent); font-weight: 700; font-family: var(--font-display); }
.product-card .biz { color: var(--muted); font-size: .88rem; }

.search-box {
  position: sticky;
  top: 0;
  z-index: 5;
  padding-bottom: .75rem;
  background: linear-gradient(var(--bg), rgba(11,18,16,.92));
}
.search-box input {
  border-radius: 999px;
  padding-left: 1.1rem;
}

.settings-list { display: grid; gap: .55rem; }
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--elevated);
}
.settings-item strong { display: block; }
.settings-item span { color: var(--muted); font-size: .88rem; }

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}

/* Legacy pages (login / secondary) */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(11,18,16,.9);
  backdrop-filter: blur(10px);
  z-index: 10;
}
.wrap { width: min(100% - 2rem, var(--max)); margin: 0 auto; padding: 2rem 0 3rem; }
.list-item {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: 0; }
.nav-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.nav-links a { color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: min(100%, 420px); }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  margin: 1.25rem 0 .75rem;
  padding: .25rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.auth-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  padding: .65rem .5rem;
  border-radius: 4px;
  cursor: pointer;
}
.auth-tab.active { background: rgba(124,255,178,.12); color: var(--ink); }
.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: .75rem;
  align-items: center;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: .85rem;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}
#recaptcha-container { min-height: 0; }
.phone-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(244,241,234,.03);
}
.phone-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.9rem;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  font-family: var(--font-display);
  user-select: none;
}
.phone-field input {
  border: 0;
  border-radius: 0;
  background: transparent;
  margin: 0;
}
.phone-field:focus-within { border-color: rgba(124,255,178,.55); }

.sheet-dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  width: min(100%, 380px);
  background: var(--elevated);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.sheet-dialog::backdrop {
  background: rgba(6, 10, 9, .72);
  backdrop-filter: blur(2px);
}
.sheet-inner { padding: 1.35rem 1.25rem 1.25rem; }
.sheet-inner h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 .5rem;
}
.conflict-card {
  margin-top: .9rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(124,255,178,.06);
  line-height: 1.45;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.tab-panel.active-anim { animation: fadeUp .28s ease; }
