/* =====================================================================
   顺路 · app shell — top bar, tab bar, page scaffolding, transitions
   ===================================================================== */

.app { min-height: 100vh; display: flex; flex-direction: column; }
.view { flex: 1; outline: none; }
body[data-shell="app"] .view { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 28px); }
@media (min-width: 900px) {
  body[data-shell="app"] .view { padding-bottom: 72px; }
}

/* ---------- top bar ---------- */
#bar-slot {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  flex: none;
}
.bar {
  position: relative;
  background: var(--ground);
  background: color-mix(in srgb, var(--ground) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background-color 0.3s;
  view-transition-name: topbar;
}
.bar.is-scrolled { border-bottom-color: var(--rule); }
body[data-shell="app"] .bar {
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border-bottom-color: var(--rule);
}
.bar__in { display: flex; align-items: center; gap: 18px; height: var(--bar-h); }

.bar__nav { display: flex; gap: 2px; margin-left: 14px; }
.bar__nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.bar__nav a .ic { width: 19px; height: 19px; }
.bar__nav a:hover { color: var(--ink); background: var(--ground); }
.bar__nav a[aria-current="page"] {
  color: var(--on-sign);
  background: var(--sign);
  box-shadow: inset 0 0 0 2.5px var(--sign), inset 0 0 0 3.7px rgba(255, 255, 255, 0.92);
}
.cnt {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--stop);
  color: #fff;
  font: 700 11px/18px "Barlow", var(--f-ui);
  text-align: center;
}
.cnt:empty { display: none; }
.bar__nav a[aria-current="page"] .cnt { background: #fff; color: var(--sign); }

.bar__end { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.bar__pub { margin-right: 6px; }
.bar__wallet {
  display: grid;
  padding: 2px 10px;
  border-radius: 8px;
  text-align: right;
  line-height: 1.15;
  transition: background-color 0.2s;
}
.bar__wallet:hover { background: var(--ground); }
.bar__wallet span { font-size: 11px; color: var(--ink-3); }
.bar__wallet b { font: 700 15px/1.2 "Barlow", var(--f-ui); font-variant-numeric: tabular-nums; }
.bar__me { display: inline-flex; margin-left: 4px; border-radius: 50%; }
.bar__me .av { transition: box-shadow 0.2s; }
.bar__me:hover .av,
.bar__me[aria-current="page"] .av { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--sign); }

.bar__links { display: flex; gap: 2px; margin-left: auto; }
.bar__links button {
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 14.5px;
  transition: background-color 0.2s, color 0.2s;
}
.bar__links button:hover { background: var(--ground-2); color: var(--ink); }
.bar--land .btn { margin-left: 8px; }

@media (max-width: 899px) {
  .bar__nav,
  .bar__pub,
  .bar__wallet,
  .bar__links { display: none; }
  .bar__in { gap: 6px; height: 56px; }
  .bar--land .btn { margin-left: auto; }
  .bar__end { gap: 2px; }
}
@media (max-width: 380px) {
  .logo__en { display: none; }
}

/* ---------- tab bar (phones) ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--rule);
  view-transition-name: tabbar;
}
.tabbar a {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 5px 0 3px;
  border-radius: 10px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.tabbar a .ic { width: 23px; height: 23px; }
.tabbar a[aria-current="page"] { color: var(--sign-ink); }
.tabbar a[aria-current="page"] .ic { stroke-width: 2.1; }
.tabbar__plate {
  display: grid;
  place-items: center;
  width: 46px;
  height: 31px;
  margin-top: -1px;
  border-radius: 8px;
  background: var(--sign);
  color: #fff;
  box-shadow: inset 0 0 0 2.5px var(--sign), inset 0 0 0 3.6px rgba(255, 255, 255, 0.92);
  transition: transform 0.2s var(--ease);
}
.tabbar__plate .ic { width: 20px !important; height: 20px !important; stroke-width: 2.4; }
.tabbar a.tabbar__pub { color: var(--ink); }
.tabbar a.tabbar__pub:active .tabbar__plate { transform: scale(0.94); }
.tabbar .badge { top: 0; right: calc(50% - 24px); }
@media (min-width: 900px) {
  .tabbar { display: none; }
}

/* ---------- page scaffolding ---------- */
.phead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  padding-block: clamp(20px, 3vw, 36px) clamp(16px, 2vw, 24px);
}
.phead h1 { font-size: var(--t-2xl); line-height: 1.1; }
.phead__kick { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.phead__sub { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.phead__end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.backbtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  margin-left: -8px;
  padding: 0 10px 0 6px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
}
.backbtn:hover { background: var(--ground-2); color: var(--ink); }
.backbtn .ic { width: 18px; height: 18px; }

.panel {
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-1);
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}
.panel__head h2,
.panel__head h3 { font-size: 16px; font-weight: 700; font-family: var(--f-ui); letter-spacing: 0; }
.panel__body { padding: 14px 18px 18px; }

.kplate,
.plate {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  border-radius: 6px;
  background: var(--sign);
  color: var(--on-sign);
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.kplate::after,
.plate::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1.3px solid rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  pointer-events: none;
}
.kplate { height: 28px; padding: 0 11px; font-size: 12.5px; }
.plate { height: 32px; padding: 0 13px; font-size: 13.5px; }

/* ---------- notifications ---------- */
.notes { display: grid; gap: 2px; margin: 0 -10px; }
.note {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 10px;
  border-radius: 12px;
  transition: background-color 0.2s;
}
.note:hover { background: var(--paper-2); }
.note__ic {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ground);
  color: var(--ink-2);
}
.note__ic .ic { width: 19px; height: 19px; }
.note__ic--accepted,
.note__ic--progress,
.note__ic--delivered { background: var(--sign-tint); color: var(--sign-ink); }
.note__ic--done,
.note__ic--rated { background: var(--go-tint); color: var(--go-ink); }
.note__ic--system { background: var(--warn-tint); color: var(--warn-ink); }
.note__body { display: grid; gap: 2px; min-width: 0; }
.note__body b { font-size: 14.5px; font-weight: 600; }
.note__body span { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.note__body em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.note.is-unread b::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--stop);
  vertical-align: 2px;
}
.confirm__fine { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); }

/* ---------- view transitions ---------- */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.34s; animation-timing-function: var(--ease-out); }
html[data-nav="slide"]::view-transition-old(root) { animation-name: vt-out; }
html[data-nav="slide"]::view-transition-new(root) { animation-name: vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
