* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: #e8ecf3;
  color: #1a1a2e;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}

.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  background: #f7f8fb;
  box-shadow: 0 0 44px rgba(26, 42, 82, 0.14);
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 14px;
  background: rgba(247, 248, 251, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #eceff5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
}

.brand-logo {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #4f7cff;
  color: #fff;
}

.brand-logo svg {
  width: 16px;
  height: 16px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e6ef;
  color: #3d4560;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.back-btn {
  visibility: hidden;
}

.back-btn.show {
  visibility: visible;
}

.chip-btn {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e6ef;
  color: #7b849a;
  font-size: 12px;
  font-weight: 600;
}

.chip-btn svg {
  width: 15px;
  height: 15px;
}

.chip-btn.active {
  background: #eef2ff;
  border-color: #cdd9ff;
  color: #4f7cff;
}

.views {
  min-height: calc(100dvh - 56px);
}

.view {
  display: none;
  padding: 18px 16px 28px;
  animation: fade-up 0.3s ease-out;
}

.view.active {
  display: block;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Home */
.home-view {
  min-height: calc(100dvh - 56px);
}

.home-view,
.mine-view {
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* Bottom tabs */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 45;
  width: 100%;
  max-width: 430px;
  height: 64px;
  display: flex;
  align-items: stretch;
  padding: 6px 18px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e6e9f0;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.tabbar[hidden] {
  display: none;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #8b94a8;
  font-size: 11px;
  font-weight: 600;
}

.tab-btn svg {
  width: 22px;
  height: 22px;
}

.tab-btn.active {
  color: #4f7cff;
  font-weight: 700;
}

.home-hero {
  padding: 42px 0 26px;
  text-align: center;
}

.hero-mark {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: linear-gradient(135deg, #5d8bff, #3f6ff5);
  color: #fff;
  box-shadow: 0 16px 32px rgba(79, 124, 255, 0.26);
}

.hero-mark svg {
  width: 44px;
  height: 44px;
}

.home-hero h1 {
  font-size: 34px;
  letter-spacing: 0;
  line-height: 1.2;
}

.tagline {
  margin-top: 10px;
  color: #5f6b85;
  font-size: 16px;
}

.primary-btn {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  background: #4f7cff;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(79, 124, 255, 0.28);
}

.primary-btn svg {
  width: 20px;
  height: 20px;
}

.upload-main {
  height: 56px;
  font-size: 17px;
}

.support {
  margin-top: 12px;
  color: #99a2b4;
  font-size: 12px;
  text-align: center;
}

.samples {
  margin-top: 34px;
}

.samples-head,
.section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: #39415a;
  font-size: 14px;
  font-weight: 700;
}

.samples-head svg,
.section-title svg {
  width: 17px;
  height: 17px;
  color: #4f7cff;
}

.sample-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sample-card {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e5e8f0;
  border-radius: 8px;
  text-align: left;
}

.sample-card:active {
  transform: scale(0.98);
}

.sample-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef2ff;
  color: #4f7cff;
}

.sample-icon svg {
  width: 18px;
  height: 18px;
}

.sample-name {
  font-size: 14px;
  font-weight: 700;
}

.sample-desc {
  color: #8b94a8;
  font-size: 11px;
  line-height: 1.4;
}

/* Mine */
.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e8f0;
  border-radius: 8px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef2ff;
  color: #4f7cff;
}

.profile-avatar svg {
  width: 26px;
  height: 26px;
}

.profile-meta {
  min-width: 0;
  flex: 1;
}

.profile-meta strong {
  display: block;
  font-size: 16px;
}

.profile-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  color: #8b94a8;
  font-size: 11px;
}

.profile-meta svg {
  width: 14px;
  height: 14px;
  color: #00a844;
}

.member-badge {
  padding: 4px 8px;
  border-radius: 99px;
  background: #f1f4f9;
  color: #6b7590;
  font-size: 10px;
  white-space: nowrap;
}

.wallet-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f7cff, #3f6ff5);
  color: #fff;
  box-shadow: 0 14px 28px rgba(79, 124, 255, 0.26);
}

.wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.wallet-head span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wallet-head svg {
  width: 16px;
  height: 16px;
}

.wallet-head em {
  font-style: normal;
  font-size: 11px;
}

.wallet-balance {
  margin: 12px 0 16px;
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.wallet-actions {
  display: flex;
  gap: 10px;
}

.wallet-btn {
  flex: 1;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.wallet-btn svg {
  width: 16px;
  height: 16px;
}

.wallet-btn.primary {
  background: #fff;
  color: #3f5fd0;
  font-weight: 700;
}

.mine-section {
  margin-top: 22px;
}

.recharge-card {
  padding: 14px;
  background: #fff;
  border: 1px solid #e5e8f0;
  border-radius: 8px;
}

.recharge-card[hidden] {
  display: none;
}

.recharge-head {
  color: #39415a;
  font-size: 13px;
  font-weight: 700;
}

.recharge-sub {
  margin-top: 3px;
  color: #8b94a8;
  font-size: 11px;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.amount-btn {
  height: 44px;
  border: 1px solid #e0e5ef;
  border-radius: 8px;
  background: #fff;
  color: #3d4560;
  font-size: 13px;
  font-weight: 700;
}

.amount-btn.active {
  border-color: #4f7cff;
  background: #eef2ff;
  color: #2f5bdb;
}

.channel-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.channel-btn {
  flex: 1;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #e0e5ef;
  border-radius: 8px;
  background: #fff;
  color: #3d4560;
  font-size: 13px;
  font-weight: 600;
}

.channel-btn svg {
  width: 16px;
  height: 16px;
}

.channel-btn.active {
  border-color: #4f7cff;
  background: #eef2ff;
  color: #2f5bdb;
}

.recharge-confirm {
  width: 100%;
  height: 46px;
  margin-top: 12px;
  border-radius: 8px;
  background: #00a844;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(0, 168, 68, 0.22);
}

.order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e5e8f0;
  border-radius: 8px;
}

.order-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f1f4f9;
  color: #4f7cff;
}

.order-icon svg {
  width: 18px;
  height: 18px;
}

.order-info {
  min-width: 0;
  flex: 1;
}

.order-info strong {
  display: block;
  color: #232b40;
  font-size: 13px;
  line-height: 1.45;
}

.order-info span {
  display: block;
  margin-top: 4px;
  color: #8b94a8;
  font-size: 11px;
}

.order-right {
  flex: none;
  text-align: right;
}

.order-right .status {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 99px;
  background: #e8f9ef;
  color: #00a844;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}

.order-right .status.printing {
  background: #fff4e0;
  color: #c07a00;
}

.order-right b {
  display: block;
  margin-top: 5px;
  color: #1a1a2e;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* AI chat and processing */
.ai-chat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.ai-avatar {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef2ff;
  color: #4f7cff;
}

.ai-avatar svg {
  width: 18px;
  height: 18px;
}

.bubble {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e7eaf1;
  border-radius: 4px 12px 12px 12px;
  box-shadow: 0 4px 12px rgba(32, 45, 80, 0.05);
  font-size: 14px;
  line-height: 1.65;
}

.file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 16px 44px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  background: #fff;
  border: 1px solid #e2e6ef;
  border-radius: 8px;
  color: #55607a;
  font-size: 12px;
}

.file-chip svg {
  width: 14px;
  height: 14px;
  color: #4f7cff;
}

.scan-card {
  padding: 22px 18px 18px;
  background: #fff;
  border: 1px solid #e5e8f0;
  border-radius: 8px;
  text-align: center;
}

.scan-sheet {
  position: relative;
  width: 62%;
  margin: 0 auto;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e7f0;
  box-shadow: 0 10px 24px rgba(30, 42, 80, 0.08);
  padding: 16px 14px;
}

.skeleton-line {
  display: block;
  height: 7px;
  margin-bottom: 12px;
  border-radius: 99px;
  background: #eef1f6;
}

.w-90 {
  width: 90%;
}

.w-85 {
  width: 85%;
}

.w-88 {
  width: 88%;
}

.w-80 {
  width: 80%;
}

.w-70 {
  width: 70%;
}

.w-55 {
  width: 55%;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #4f7cff, transparent);
  animation: scan 1.5s linear infinite;
}

@keyframes scan {
  from {
    top: 0;
  }
  to {
    top: calc(100% - 2px);
  }
}

.scan-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
  color: #5f6b85;
  font-size: 13px;
}

.scan-status svg {
  width: 16px;
  height: 16px;
  color: #4f7cff;
}

.reverse-guide {
  margin-top: 16px;
}

.guide-callout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  background: #fff8e8;
  border: 1px solid #ffe0a1;
  border-radius: 8px;
  color: #7a5800;
  font-size: 13px;
}

.guide-callout svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
}

.guide-callout strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

.guide-callout span {
  color: #9a7a2e;
  font-size: 12px;
}

.reverse-guide .primary-btn {
  margin-top: 14px;
}

.ghost-btn {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  border: 1px solid #d7dce7;
  border-radius: 12px;
  background: #fff;
  color: #4b5468;
  font-size: 14px;
}

.ghost-btn svg {
  width: 17px;
  height: 17px;
}

/* Preview and specs */
.preview-card {
  padding: 14px;
  background: #fff;
  border: 1px solid #e5e8f0;
  border-radius: 8px;
  margin-bottom: 18px;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #39415a;
  font-size: 13px;
  font-weight: 700;
}

.preview-head span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-head svg {
  width: 16px;
  height: 16px;
  color: #4f7cff;
}

.preview-head em {
  color: #8b94a8;
  font-style: normal;
  font-weight: 500;
  font-size: 11px;
}

.preview-note {
  margin-top: 10px;
  color: #9aa3b5;
  font-size: 11px;
  text-align: center;
}

.preview-page {
  position: relative;
  width: 100%;
  aspect-ratio: 210 / 297;
  margin-top: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dde2ec;
  box-shadow: 0 10px 24px rgba(30, 42, 80, 0.1);
}

.preview-doc {
  padding: 7% 6%;
}

.doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5%;
}

.doc-title-line {
  width: 34%;
  height: 8px;
  border-radius: 99px;
  background: #dfe4ee;
}

.stamp {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(220, 48, 48, 0.85);
  border-radius: 50%;
  color: rgba(220, 48, 48, 0.85);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.text-line {
  display: block;
  height: 7px;
  margin-bottom: 3.4%;
  border-radius: 99px;
  background: #e6eaf1;
}

.sign-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8%;
}

.sign-row .text-line {
  width: 28%;
}

.preview-id {
  padding: 3.6%;
  display: flex;
  flex-direction: column;
  gap: 3%;
}

.id-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5%;
  padding: 2.6% 4%;
  background: #f3f5f9;
  border: 1px solid #d9dee8;
  border-radius: 6px;
}

.id-photo {
  width: 20%;
  height: 82%;
  flex: none;
  background: #dbe3f0;
  border-radius: 3px;
}

.id-lines {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
  color: #3a4259;
  font-size: 7px;
  line-height: 1.3;
}

.id-lines span {
  white-space: nowrap;
}

.emblem {
  width: 16%;
  height: 74%;
  flex: none;
  display: grid;
  place-items: center;
  border: 1.5px solid #b39b4d;
  border-radius: 50%;
  color: #b39b4d;
  font-size: 9px;
  font-weight: 700;
}

.preview-receipt {
  padding: 4% 6%;
  display: flex;
  flex-direction: column;
  gap: 3.4%;
  background: #fbfcfd;
}

.receipt-strip {
  flex: 1;
  padding: 3.5% 4%;
  background: #fff;
  border: 1px solid #e3e7ef;
  border-radius: 3px;
}

.receipt-strip header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5%;
  color: #3d4560;
  font-size: 8px;
  font-weight: 700;
}

.receipt-strip header span {
  display: block;
  height: 5px;
  width: 30%;
  border-radius: 99px;
  background: #e3e8f0;
}

.receipt-strip header em {
  color: #8b94a8;
  font-size: 7px;
  font-style: normal;
}

.receipt-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.receipt-rows span {
  display: block;
  height: 4px;
  border-radius: 99px;
  background: #edf0f5;
}

.receipt-rows span:nth-child(2) {
  width: 76%;
}

.receipt-rows span:nth-child(3) {
  width: 58%;
}

.receipt-total {
  margin-top: 6px;
  width: 36%;
  height: 5px;
  border-radius: 99px;
  background: #d6dce8;
}

.preview-photo {
  background: linear-gradient(165deg, #9fc5ef 0%, #d8e8f5 38%, #e8d7ae 72%, #9bbf8c 100%);
}

.photo-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 24%, rgba(255, 244, 214, 0.95) 0 7%, transparent 7.5%),
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.08) 100%);
}

.photo-mountain {
  position: absolute;
  left: -8%;
  right: 44%;
  bottom: 26%;
  height: 42%;
  background: linear-gradient(160deg, #6d8bb0, #4c6b8d);
  clip-path: polygon(0 100%, 34% 0, 64% 58%, 100% 100%);
}

.photo-mountain::after {
  content: "";
  position: absolute;
  left: 46%;
  right: -60%;
  bottom: 0;
  height: 62%;
  background: linear-gradient(160deg, #5b7d9e, #3f5d7d);
  clip-path: polygon(0 100%, 30% 0, 62% 62%, 100% 100%);
}

.photo-grass {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 27%;
  background: linear-gradient(180deg, #9bbf8c, #6f9b62);
}

.chat-stack {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-bubble {
  max-width: 100%;
}

.spec-title {
  color: #232b40;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.spec-sub,
.spec-note {
  margin-top: 4px;
  color: #8b94a8;
  font-size: 11px;
  line-height: 1.5;
}

.spec-note {
  color: #3d4560;
  font-size: 13px;
  font-weight: 600;
}

.spec-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e8ebf2;
}

.spec-row-label {
  display: block;
  margin-bottom: 8px;
  color: #5f6b85;
  font-size: 12px;
  font-weight: 600;
}

.spec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opt-btn {
  position: relative;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid #e0e5ef;
  border-radius: 8px;
  background: #fff;
  color: #3d4560;
  font-size: 13px;
  font-weight: 600;
}

.opt-btn:active {
  transform: scale(0.98);
}

.opt-btn.active {
  border-color: #4f7cff;
  background: #eef2ff;
  color: #2f5bdb;
}

.rec-tag {
  position: absolute;
  top: -8px;
  right: -6px;
  padding: 2px 6px;
  border-radius: 99px;
  background: #00b35c;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  box-shadow: 0 2px 6px rgba(0, 179, 92, 0.28);
}

.qty-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #e0e5ef;
  border-radius: 8px;
  background: #fff;
  color: #3d4560;
}

.qty-btn:active {
  transform: scale(0.96);
}

.qty-btn svg {
  width: 16px;
  height: 16px;
}

#copyInput {
  width: 66px;
  height: 38px;
  border: 1px solid #d5dbe7;
  border-radius: 8px;
  background: #fff;
  color: #1a1a2e;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

#copyInput::-webkit-inner-spin-button,
#copyInput::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-unit {
  color: #5f6b85;
  font-size: 13px;
}

.ask-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.ask-btn {
  flex: 1;
  height: 42px;
  border: 1px solid #dbe1ec;
  border-radius: 8px;
  background: #fff;
  color: #3d4560;
  font-size: 14px;
  font-weight: 700;
}

.ask-btn:first-child {
  border-color: #4f7cff;
  background: #4f7cff;
  color: #fff;
}

.preview-idphoto {
  padding: 5%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4%;
  align-content: start;
  background: #f8f9fc;
}

.id-photo-cell {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(180deg, #c7d5ec 0%, #dfe7f3 58%, #eef1f6 100%);
  border: 1px solid #d7deeb;
  border-radius: 3px;
}

.id-photo-cell .cell-head {
  position: absolute;
  left: 50%;
  top: 12%;
  width: 34%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #8ba0c4;
}

.id-photo-cell .cell-shoulders {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -6%;
  height: 44%;
  border-radius: 50% 50% 0 0;
  background: #6d82a8;
}

/* Confirm bar */
.confirm-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  width: 100%;
  max-width: 430px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #e6e9f0;
  transform: translateX(-50%);
}

.confirm-bar[hidden] {
  display: none;
}

.confirm-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.confirm-price span {
  color: #8b94a8;
  font-size: 11px;
}

.confirm-price strong {
  color: #f04438;
  font-size: 19px;
  font-weight: 800;
}

.confirm-btn {
  height: 50px;
  flex: 1;
  border-radius: 12px;
  background: #4f7cff;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(79, 124, 255, 0.25);
}

#view-specs {
  padding-bottom: 104px;
}

/* Queue */
.queue-state {
  padding: 24px 0 18px;
  text-align: center;
}

.state-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef2ff;
  color: #4f7cff;
}

.state-icon svg {
  width: 34px;
  height: 34px;
}

.state-icon.pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(79, 124, 255, 0.22);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(79, 124, 255, 0);
  }
}

.queue-title {
  font-size: 20px;
  letter-spacing: 0;
}

.queue-sub {
  margin-top: 6px;
  color: #8b94a8;
  font-size: 12px;
}

.progress-card {
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e8f0;
  border-radius: 8px;
  margin-bottom: 14px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #eef1f6;
}

.progress-fill {
  width: 30%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #5d8bff, #3f6ff5);
  transition: width 1s linear;
}

.queue-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: #5f6b85;
  font-size: 12px;
}

.order-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e5e8f0;
  border-radius: 8px;
}

.order-title {
  color: #232b40;
  font-size: 13px;
  font-weight: 700;
}

.order-sub {
  margin-top: 4px;
  color: #8b94a8;
  font-size: 11px;
}

.order-price {
  color: #f04438;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.secondary-btn {
  width: 100%;
  height: 46px;
  margin-top: 14px;
  border: 1px solid #d7dce7;
  border-radius: 12px;
  background: #fff;
  color: #4b5468;
  font-size: 14px;
}

/* Pickup */
.pickup-hero {
  padding: 24px 0 20px;
  text-align: center;
}

.success-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f9ef;
  color: #00a844;
}

.success-icon svg {
  width: 38px;
  height: 38px;
}

.pickup-title {
  font-size: 22px;
  letter-spacing: 0;
}

.device-pill {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 99px;
  background: #eef2ff;
  color: #3f5fd0;
  font-size: 14px;
  font-weight: 700;
}

.countdown {
  margin-top: 18px;
  color: #1a1a2e;
  font-size: 58px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.countdown-note {
  margin-top: 8px;
  color: #7b849a;
  font-size: 13px;
}

.pickup-order {
  margin-top: 8px;
}

.contact-btn {
  color: #6b7590;
  font-size: 13px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 80;
  max-width: 320px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #1a1a2e;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 600px) {
  .app {
    margin-top: 20px;
    min-height: calc(100dvh - 40px);
    border-radius: 20px;
  }

  .views {
    min-height: calc(100dvh - 96px);
  }

  .home-view {
    min-height: calc(100dvh - 96px);
  }

  .confirm-bar {
    bottom: 20px;
    border-radius: 14px;
    box-shadow: 0 -8px 30px rgba(26, 42, 82, 0.12);
  }

  .tabbar {
    bottom: 20px;
    border-radius: 0 0 20px 20px;
  }
}
