:root {
  --bg: #f5f7fb;
  --ink: #172033;
  --muted: #667085;
  --line: #e4e9f2;
  --card: #ffffff;
  --green: #1e9b73;
  --gold: #c47a1b;
  --blue: #2d68c4;
  --rose: #c44b65;
  --teal: #197b8a;
  --shadow: 0 18px 48px rgba(34, 46, 72, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #dfe5ee;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.phone-shell {
  width: min(100vw, 390px);
  min-height: 844px;
  max-height: 844px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  position: relative;
  padding: 12px 16px 94px;
  box-shadow: var(--shadow);
}

.status-bar,
.topbar,
.section-head,
.meta-row,
.row-card,
.notice-strip,
.bottom-nav,
.form-row,
.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-bar {
  height: 28px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.status-icons {
  word-spacing: 6px;
}

.topbar {
  min-height: 60px;
  gap: 12px;
}

.eyebrow,
p,
h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

h1 {
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.12;
}

h2 {
  font-size: 17px;
}

h3 {
  font-size: 15px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 18px;
}

.search-card,
.panel,
.notice-strip,
.hero,
.form-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-card {
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-card input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.search-icon {
  width: 14px;
  height: 14px;
  border: 2px solid #8b97aa;
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}

.search-icon::after {
  content: "";
  width: 7px;
  height: 2px;
  position: absolute;
  right: -6px;
  bottom: -3px;
  background: #8b97aa;
  transform: rotate(45deg);
}

.view {
  flex: 1;
  min-height: 0;
  height: auto;
  overflow-y: auto;
  padding: 14px 0 32px;
  scrollbar-width: none;
}

.view::-webkit-scrollbar {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 14px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, #17324d 0%, #24685d 58%, #a96f2e 100%);
}

.hero-copy {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.88;
}

.hero-badge {
  align-self: end;
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 12px 8px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-badge span {
  font-size: 12px;
}

.hero-badge strong {
  font-size: 30px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.quick-card {
  min-height: 116px;
  padding: 14px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  text-align: left;
  color: var(--ink);
}

.quick-mark,
.thumb {
  display: grid;
  place-items: center;
  font-weight: 800;
}

.quick-mark {
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 8px;
  color: #fff;
}

.accent-green .quick-mark,
.badge.green {
  background: var(--green);
}

.accent-gold .quick-mark,
.badge.gold {
  background: var(--gold);
}

.accent-blue .quick-mark,
.badge.blue {
  background: var(--blue);
}

.accent-rose .quick-mark,
.badge.rose {
  background: var(--rose);
}

.quick-card p,
.muted-text,
.row-card p,
.form-hint,
.profile-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.quick-card p {
  margin-top: 7px;
}

.panel,
.form-panel {
  margin-top: 14px;
  padding: 15px;
}

.section-head {
  margin-bottom: 13px;
}

.section-head span,
.meta-row {
  color: var(--muted);
  font-size: 12px;
}

.stack {
  display: grid;
  gap: 10px;
}

.row-card {
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.row-main {
  min-width: 0;
  flex: 1;
}

.row-main h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-main p {
  margin-top: 5px;
}

.thumb {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #fff;
  background: #27384d;
}

.meta-row {
  margin-top: 8px;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.pill,
.price {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef3f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.price {
  color: var(--green);
  background: #e9f7f1;
}

.primary-button,
.ghost-button,
.danger-button {
  min-width: 64px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-size: 13px;
  font-weight: 800;
  flex: 0 0 auto;
}

.ghost-button {
  color: var(--ink);
  background: #eef3f8;
}

.danger-button {
  background: var(--rose);
}

.full-button,
.auth-choice {
  width: 100%;
  height: 42px;
}

.auth-panel {
  margin-top: 0;
}

.auth-choice-grid {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-row {
  min-height: 42px;
  gap: 10px;
}

.form-row label {
  width: 74px;
  color: var(--muted);
  font-size: 13px;
}

.form-row input,
.form-row select,
.form-row textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  outline: 0;
  color: var(--ink);
}

.form-row textarea {
  min-height: 70px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.notice-strip {
  margin-top: 14px;
  padding: 13px 15px;
  gap: 12px;
}

.notice-strip span {
  color: var(--rose);
  font-size: 12px;
  font-weight: 800;
}

.notice-strip p {
  margin-top: 4px;
}

.profile-card {
  padding: 16px;
  border-radius: 8px;
  background: #172033;
  color: #fff;
}

.profile-card p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.profile-stat {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.profile-stat strong {
  display: block;
  font-size: 18px;
}

.profile-stat span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.72;
}

.profile-row {
  min-height: 44px;
  border-top: 1px solid var(--line);
  gap: 10px;
}

.profile-row:first-child {
  border-top: 0;
}

.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.toast {
  position: absolute;
  left: 50%;
  top: 92px;
  z-index: 5;
  transform: translateX(-50%);
  max-width: 320px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: rgba(23, 32, 51, 0.94);
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(23, 32, 51, 0.22);
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 76px;
  padding: 10px 22px 18px;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line);
}

.nav-item {
  width: 58px;
  height: 38px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.nav-item.active {
  color: var(--green);
}

@media (max-width: 390px) {
  body {
    place-items: start center;
    background: var(--bg);
  }

  .phone-shell {
    min-height: 100vh;
    max-height: none;
    box-shadow: none;
  }
}
