﻿:root {
  --bg: #d9d9d9;
  --white: #fff;
  --primary: #a9151a;
  --text: rgba(0, 0, 0, 0.9);
  --muted: rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background: #c9c9c9;
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.phone-shell {
  width: min(100vw, 430px);
  min-height: 100dvh;
  background: var(--bg);
  padding-bottom: 20px;
}

.wx-statusbar {
  height: calc(env(safe-area-inset-top) + 22px);
  padding: env(safe-area-inset-top) 14px 5px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  color: #111;
}

.status-time {
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.signal {
  display: inline-flex;
  align-items: end;
  gap: 1px;
  height: 12px;
}

.signal i {
  display: block;
  width: 2px;
  border-radius: 1px;
  background: #111;
}

.signal i:nth-child(1) {
  height: 4px;
}

.signal i:nth-child(2) {
  height: 6px;
}

.signal i:nth-child(3) {
  height: 8px;
}

.signal i:nth-child(4) {
  height: 10px;
}

.wifi {
  width: 12px;
  height: 8px;
  border: 2px solid #111;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  transform: translateY(-1px) rotate(180deg);
  opacity: 0.9;
}

.battery {
  width: 22px;
  height: 11px;
  border: 1.7px solid #111;
  border-radius: 3px;
  padding: 1px;
  position: relative;
}

.battery::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 3px;
  width: 2px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: #111;
}

.battery .level {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: 2px;
  background: #111;
}

.topbar {
  display: grid;
  grid-template-columns: 28px 1fr 88px;
  align-items: center;
  padding: 5px 12px 10px;
  background: #d4d4d4;
}

.back-btn {
  border: 0;
  background: transparent;
  color: #111;
  font-size: 28px;
  line-height: 1;
  padding: 0;
  transform: translateY(-1px);
  -webkit-tap-highlight-color: transparent;
}

.topbar h1 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
}

.mini-actions {
  justify-self: end;
  width: 88px;
  height: 32px;
  border-radius: 17px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(248, 248, 248, 0.72) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: grid;
  grid-template-columns: 1fr 33px;
  align-items: center;
  position: relative;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.mini-actions::before {
  content: "";
  position: absolute;
  right: 33px;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: rgba(0, 0, 0, 0.14);
}

.dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transform: translateX(1px);
}

.dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #111;
  display: block;
}

.circle {
  justify-self: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.7px solid #111;
}

.hero {
  background: rgba(0, 0, 0, 0.1);
  padding: 12px 14px 8px;
}

.status-pill {
  border: 1px solid var(--primary);
  border-radius: 8px;
  color: var(--primary);
  text-align: center;
  font-size: 13px;
  line-height: 25px;
  margin-bottom: 7px;
}

.wood-card {
  background: url("./assets/wood.png") no-repeat;
  background-size: cover;
  border-radius: 14px;
  color: #fff;
  text-align: center;
  padding: 19px 10px 12px;
}

.sub-title {
  font-size: 20px;
  line-height: 1.2;
}

.queue-number {
  font-size: 66px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 10px 0 2px;
}

.live-time {
  color: #7f7f7f;
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
}

.store-card {
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 8px;
  padding: 11px 14px;
}

.store-left {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 9px;
  align-items: center;
}

.logo {
  width: 46px;
  height: 46px;
  border-radius: 4px;
}

.store-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 3px;
}

.store-address {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.map-btn {
  background: var(--primary);
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
  padding: 2px 6px;
  margin-top: 2px;
}

.card {
  background: var(--white);
  border-radius: 12px;
  margin: 12px 14px;
  padding: 13px;
}

.banner {
  padding: 0;
  overflow: hidden;
}

.banner img {
  width: 100%;
  display: block;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 6px;
  column-gap: 10px;
  font-size: 14px;
  line-height: 20px;
}

.info-grid .k {
  color: var(--primary);
}

.info-grid .v {
  color: var(--muted);
  text-align: right;
}

.dark-k .k {
  color: var(--text);
}

.waiting-card h2 {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
}

.mini-title {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  margin-top: 7px;
}

.queue-line {
  margin-top: 3px;
  color: var(--primary);
  font-size: 14px;
  line-height: 20px;
}

.queue-line span {
  margin-left: 16px;
}

.notes p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.fullscreen-btn {
  position: fixed;
  right: 12px;
  bottom: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 8px 12px;
  font-size: 12px;
}

dialog {
  width: min(94vw, 420px);
  border: 0;
  border-radius: 14px;
  padding: 0;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.menu-form {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.menu-form h3 {
  margin: 0 0 4px;
}

.menu-form label {
  color: #333;
  font-size: 13px;
  display: grid;
  gap: 6px;
}

.picker-box {
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.picker-box > label {
  font-size: 13px;
  color: #444;
}

.store-picker-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

#cfgStoreSelect {
  border: 1px solid #d3d3d3;
  border-radius: 8px;
  padding: 6px;
  font-size: 13px;
  background: #fff;
}

#cfgStoreSelect option {
  padding: 6px 4px;
}

.store-status {
  font-size: 12px;
  color: #777;
}

.menu-form input {
  border: 1px solid #d3d3d3;
  border-radius: 10px;
  padding: 9px;
  font-size: 14px;
}

.menu-form menu {
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.menu-form button {
  border: 0;
  border-radius: 10px;
  background: #821320;
  color: #fff;
  padding: 8px 14px;
}

.menu-form .ghost {
  background: #ececec;
  color: #333;
}

@media (max-width: 360px) {
  .topbar {
    grid-template-columns: 26px 1fr 82px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .mini-actions {
    width: 82px;
    grid-template-columns: 1fr 30px;
  }

  .mini-actions::before {
    right: 30px;
  }

  .queue-number {
    font-size: 58px;
  }
}
