:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --ink: #1d2433;
  --muted: #667085;
  --line: #e7eaf0;
  --accent: #e54862;
  --green: #15a46e;
  --blue: #2f6fed;
  --orange: #f27a1a;
  --yellow: #d49a00;
  --purple: #7b61ff;
  --shadow: 0 10px 30px rgba(24, 35, 62, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.loading,
.error {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.hero {
  position: fixed;
  inset: 0 0 auto 0;
  height: 248px;
  max-width: 480px;
  margin: 0 auto;
  z-index: 0;
  background: linear-gradient(135deg, #1f2937, #b6404d);
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72) saturate(1.04);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(246, 247, 251, 0.04) 54%, var(--bg) 100%);
}

.brand {
  position: fixed;
  top: max(22px, env(safe-area-inset-top));
  left: 50%;
  width: min(calc(100% - 32px), 448px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
  color: #fff;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  flex: 0 0 auto;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--accent);
  font-weight: 800;
  border: 2px solid rgba(255, 255, 255, 0.86);
}

.brand h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.content {
  position: relative;
  z-index: 1;
  padding: 198px 16px 34px;
}

.browser-tip {
  border: 1px solid rgba(21, 164, 110, 0.24);
  background: #effaf5;
  color: #08704a;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 14px;
}

.section {
  margin-top: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.2;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 10px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-card,
.mini-card,
.wifi-card,
.product-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.action-card {
  min-height: 96px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  color: var(--ink);
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.action-card:active,
.mini-card:active,
.product-card:active {
  transform: scale(0.98);
}

.action-main {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
}

.icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  flex: 0 0 auto;
}

.icon svg {
  width: 20px;
  height: 20px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.mini-card {
  min-height: 112px;
  padding: 13px 9px;
  border: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  cursor: pointer;
}

.pill {
  min-width: 100%;
  border-radius: 999px;
  padding: 6px 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.group-panel {
  padding: 14px;
  border: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.group-button {
  min-width: 0;
  border: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--ink);
}

.round-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f2f4f7;
  color: var(--blue);
  font-weight: 800;
}

.round-icon svg {
  width: 29px;
  height: 29px;
}

.label {
  width: 100%;
  border-radius: 999px;
  color: #fff;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wifi-card {
  padding: 15px;
  border: 0;
}

.wifi-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 5px 0;
  font-size: 14px;
}

.wifi-row span:first-child {
  color: var(--muted);
}

.wifi-value {
  font-weight: 800;
  text-align: right;
  word-break: break-all;
}

.copy-wifi {
  width: 100%;
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  margin-top: 10px;
  background: #e8f7f0;
  color: #08704a;
  font-weight: 800;
  cursor: pointer;
}

.copy-wifi.copied {
  background: var(--green);
  color: #fff;
}

.product-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 0;
  cursor: pointer;
}

.product-card img,
.product-fallback {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
}

.product-fallback {
  display: grid;
  place-items: center;
  background: #f0f2f5;
  color: var(--muted);
  font-weight: 800;
}

.product-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-body h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.tag {
  display: inline-block;
  margin-top: 7px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #f2f4f7;
  color: var(--muted);
  font-size: 11px;
}

.price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.price {
  color: var(--accent);
  font-weight: 900;
}

.old-price {
  color: #98a2b3;
  text-decoration: line-through;
  font-size: 12px;
}

.buy-button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  padding: 7px 10px;
  font-weight: 800;
  white-space: nowrap;
}

.footer {
  margin: 20px 4px 0;
  color: #98a2b3;
  font-size: 12px;
  line-height: 1.55;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(17, 24, 39, 0.52);
  padding-top: 36px;
}

.sheet {
  width: min(100%, 480px);
  max-height: 84vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 18px 18px max(18px, env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(17, 24, 39, 0.2);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 19px;
}

.close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f2f4f7;
  color: var(--ink);
  cursor: pointer;
}

.copy-text {
  white-space: pre-wrap;
  background: #f7f8fa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  font-size: 14px;
  line-height: 1.65;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.media-grid img,
.media-grid video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.sheet-actions button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.secondary {
  background: #eef2f7;
  color: var(--ink);
}

.primary {
  background: var(--accent);
  color: #fff;
}

.bg-black {
  background: #111;
}

.bg-red {
  background: var(--accent);
}

.bg-orange {
  background: var(--orange);
}

.bg-green {
  background: var(--green);
}

.bg-blue {
  background: var(--blue);
}

.bg-yellow {
  background: var(--yellow);
}

.bg-purple {
  background: var(--purple);
}

@media (max-width: 360px) {
  .content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .grid-3 {
    gap: 8px;
  }

  .round-icon {
    width: 50px;
    height: 50px;
  }
}
