* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body { font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif; background: #f6f7f9; color:#0f172a; min-height: 100vh; padding-bottom: 80px; }
a { color: inherit; text-decoration: none; -webkit-touch-callout: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 12px; padding-bottom: 100px; }

.topbar { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(8px); background: rgba(246,247,249,.95); border-bottom: 1px solid #e5e7eb; }
.topbar-inner { display:flex; align-items:center; justify-content:space-between; gap: 10px; padding: 12px 16px; max-width:1080px; margin: 0 auto; }
.brand { display:flex; align-items:center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand-badge { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg,#667eea,#764ba2); flex-shrink: 0; }
.search { flex: 1; display:flex; justify-content:center; }
.search input { width: min(520px, 100%); padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 12px; background:#fff; }

.marquee { margin-top: 12px; background: #fff7e6; border: 1px solid #ffe7ba; border-radius: 12px; padding: 10px 12px; display:flex; align-items:center; gap: 8px; overflow:hidden; }
.marquee .label { font-weight: 700; color:#fa8c16; white-space:nowrap; font-size: 13px; padding: 4px 8px; background: rgba(250,140,22,.1); border-radius: 6px; }
.marquee .track { position: relative; overflow:hidden; flex: 1; }
.marquee .text { display:inline-block; white-space:nowrap; padding-left: 100%; animation: marquee 12s linear infinite; color:#7c2d12; font-size: 14px; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

.hero { margin-top: 12px; display:grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .hero { grid-template-columns: 1.4fr .6fr; } }

.carousel { background:#000; border-radius: 12px; overflow:hidden; position: relative; min-height: 180px; }
.slides { display:flex; transition: transform .45s ease; }
.slide { min-width: 100%; height: 200px; background:#0b1220; }
.slide img { width: 100%; height: 100%; object-fit: cover; display:block; }
@media (min-width: 768px) { .slide { height: 240px; } }
@media (min-width: 1024px) { .slide { height: 260px; } }

.dots { position:absolute; left: 0; right: 0; bottom: 12px; display:flex; justify-content:center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.45); cursor:pointer; }
.dot.is-active { background: rgba(255,255,255,.95); }

.side-card { display: none; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; }
@media (min-width: 768px) { .side-card { display: block; } }
.side-title { font-weight: 700; margin-bottom: 10px; font-size: 15px; }
.side-muted { color:#64748b; font-size: 13px; line-height: 1.6; }

.cats { margin-top: 12px; background:#fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; }
.cat-row { display:flex; gap: 10px; overflow:auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-pill { flex: 0 0 auto; padding: 10px 16px; border-radius: 999px; border: 1px solid #e5e7eb; background:#fff; font-size: 14px; font-weight: 500; white-space: nowrap; }
.cat-pill.is-active { border-color:#667eea; background: rgba(102,126,234,.10); color:#4338ca; font-weight: 700; }

.section { margin-top: 12px; }
.section-head { display:flex; align-items:end; justify-content:space-between; gap: 10px; margin-bottom: 12px; }
.section-title { font-weight: 700; font-size: 17px; }
.section-sub { color:#64748b; font-size: 13px; }

.grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card { background:#fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow:hidden; display:flex; flex-direction:column; }
.thumb { height: 140px; background:#f1f5f9; }
@media (min-width: 768px) { .thumb { height: 160px; } }
.thumb img { width:100%; height:100%; object-fit: cover; display:block; }
.card-body { padding: 12px; display:flex; flex-direction:column; gap: 6px; flex: 1; }
.name { font-weight: 700; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden; }
.brief { color:#64748b; font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden; }
.meta { display:flex; align-items:center; justify-content:space-between; gap: 8px; margin-top:auto; padding-top: 8px; }
.price { color:#ef4444; font-weight: 700; font-size: 15px; }
.tag { font-size: 11px; color:#334155; background:#f1f5f9; border-radius: 999px; padding: 4px 8px; white-space: nowrap; }

.empty { background:#fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; color:#64748b; text-align: center; font-size: 14px; }
.err { background:#fff1f2; border: 1px solid #fecdd3; border-radius: 12px; padding: 16px; color:#9f1239; font-size: 14px; }

.footer { margin: 20px 0 12px; color:#94a3b8; font-size: 12px; text-align:center; line-height: 1.6; padding: 0 16px; }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(255,255,255,.98);
  border-top: 1px solid #e5e7eb;
  backdrop-filter: blur(10px);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  align-items: end;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 12px;
  color: #64748b;
  font-size: 11px;
  user-select: none;
  min-height: 56px;
}
.nav-item .ico {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #f1f5f9;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 700;
  font-size: 12px;
  color:#334155;
}
.nav-item.is-active {
  color: #4338ca;
  background: rgba(102,126,234,.10);
}
.nav-item.is-active .ico {
  background: rgba(102,126,234,.18);
  color:#4338ca;
}
.nav-item.is-worker {
  transform: translateY(-10px);
}
.nav-item.is-worker .ico {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg,#667eea,#764ba2);
  color:#fff;
  box-shadow: 0 8px 20px rgba(102,126,234,.4);
  font-size: 14px;
}
.nav-item.is-worker {
  color:#4338ca;
  font-weight: 700;
}
