:root {
  color-scheme: light;
  --background: #f1f1f1;
  --surface: #ffffff;
  --ink: #282828;
  --muted: #686868;
  --forest: #ee3f63;
  --forest-deep: #222;
  --border: #ededed;
  --green-soft: #fdf1f4;
  --focus: #c9274b;
  --device-width: 430px;
  --nav-height: 89px;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #dfe2e6; }
main, article, section, aside, nav, header { min-width: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: 24px; line-height: 1.28; font-weight: 640; overflow-wrap: anywhere; }
h2 { font-size: 17px; line-height: 1.35; font-weight: 650; }
h3 { font-size: 15px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
img { display: block; max-width: 100%; }
svg { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link:focus { position: fixed; z-index: 20; left: 16px; top: 8px; padding: 8px 12px; background: white; }

.shell {
  min-height: 100dvh; width: min(100%, var(--device-width)); margin-inline: auto;
  background: var(--background); display: flex; flex-direction: column;
}
.workspace { display: flex; flex-direction: column; flex: 1; }
.shell:has(.mobile-nav:not([hidden])) .workspace { padding-bottom: var(--nav-height); }
.main-content { width: 100%; flex: 1; padding: 12px 10px 20px; outline: none; }
.main-content[data-view="home"], .main-content[data-view="messages"], .main-content[data-view="profile"] { padding: 0; }
.main-content[data-view="card"] { padding: 0; }
.topbar {
  position: relative; display: grid; place-items: center; min-height: 43px; flex: none;
  padding: 7px 46px; background: #fff; border-bottom: 1px solid #f1f1f1; font-size: 16px;
}
.breadcrumb-back { position: absolute; display: grid; place-items: center; inset: 0 auto 0 0; width: 43px; }
.breadcrumb-back > span { display: block; width: 10px; height: 10px; border-left: 1.6px solid #292929; border-bottom: 1.6px solid #292929; transform: rotate(45deg); }
.mobile-nav {
  display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 4; bottom: 0;
  left: 50%; transform: translateX(-50%); width: min(100%, var(--device-width)); height: var(--nav-height);
  background: #fff url("./assets/nav-home.webp") center / 100% 100% no-repeat;
}
.mobile-nav[data-view="card"] { background-image: url("./assets/nav-card.webp"); }
.mobile-nav[data-view="messages"] { background-image: url("./assets/nav-messages.webp"); }
.mobile-nav[data-view="profile"] { background-image: url("./assets/nav-profile.webp"); }
.mobile-nav .nav-link { display: block; height: 60px; position: relative; }
.mobile-nav[data-read="true"]:not([data-view="messages"])::after {
  content: ""; position: absolute; pointer-events: none; top: 7px; left: 58%; width: 11%; height: 31px;
  background: #fff url("./assets/nav-message-read.svg") 38% 65% / 27px 24px no-repeat;
}
@media (max-width: 430px) {
  body { background: var(--background); }
}

.recorded-home-header {
  position: relative; height: 71px; background: #f1f1f1 url("./assets/home-header.webp") center / 100% 100% no-repeat;
}
.recorded-scan { position: absolute; top: 0; right: 2%; width: 14%; height: 100%; }
.recorded-quick {
  display: grid; grid-template-columns: 227fr 161fr 164fr; margin: 0 auto;
  width: 85.6%; height: 55px; background: url("./assets/home-quick.webp") center / 100% 100% no-repeat;
}
.recorded-quick > a { min-width: 0; }
.recorded-service-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 24px 7px 0; grid-auto-rows: 83px;
}
.recorded-service {
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0;
  text-align: center; color: #333; font-size: 12px; line-height: 1.28;
}
.recorded-service img { flex: none; width: 37px; height: 37px; }
.recorded-news { margin: 5px 10px 14px; min-height: 165px; padding: 15px 10px 10px; border-radius: 12px; background: #fff; }
.recorded-news-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.recorded-news-heading h2 { font-size: 14px; font-weight: 700; }
.recorded-news-heading a { color: #838383; font-size: 12px; white-space: nowrap; }
.recorded-news-heading a svg { color: #b4b4b4; margin-right: -4px; }
.recorded-article {
  display: grid; grid-template-columns: minmax(0, 1fr) min(28vw, 117px); grid-template-rows: auto 1fr;
  align-items: start; gap: 4px 10px; margin-top: 31px; min-height: 83px;
}
.recorded-article strong { grid-column: 1; font-size: 14px; font-weight: 400; }
.recorded-article img { grid-column: 2; grid-row: 1 / span 2; width: 100%; height: auto; border-radius: 6px; }
.recorded-article-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-self: end; gap: 2px 6px; color: #919191; font-size: 11.5px; }

.page-stack { display: grid; align-content: start; gap: 13px; min-width: 0; }
.panel { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 14px; min-width: 0; }
.page-intro { display: grid; gap: 6px; padding: 4px 0; min-width: 0; }
.page-intro p:not(.eyebrow) { color: var(--muted); }
.eyebrow { color: #986371; font-size: 12px; font-weight: 660; }
.primary-button, .secondary-button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 43px; padding: 9px 13px;
  border: 1px solid transparent; border-radius: 8px; font-weight: 620; text-align: center; line-height: 1.4;
}
.primary-button { color: white; background: var(--forest); }
.primary-button:hover:not(:disabled) { background: #dc3458; }
.secondary-button { color: var(--ink); background: white; border-color: #e5e5e5; }
.secondary-button:hover:not(:disabled) { background: #f9f9f9; }
.field { display: grid; gap: 5px; min-width: 0; font-size: 13px; font-weight: 620; }
.field > input:not([type="checkbox"], [type="radio"]), .field > select, .field > textarea {
  width: 100%; min-height: 43px; padding: 8px 11px; border: 1px solid #e7e7e7; border-radius: 8px; background: #fcfcfc; font-weight: 450;
}
.field > textarea { min-height: 86px; }
.empty-state { display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 140px; text-align: center; padding: 16px; color: var(--muted); }
.empty-state h1, .empty-state h2 { color: var(--ink); }
.list-row { display: flex; align-items: center; gap: 12px; min-height: 52px; width: 100%; padding: 8px 4px; color: var(--ink); }
a.list-row:hover, button.list-row:hover { background: #fafafa; }
.icon-tile { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fdf1f4; color: #dd4769; flex: none; }

.setup-panel { margin: 6px 3px; border: 1px solid var(--border); border-radius: 12px; background: white; overflow: hidden; }
.setup-copy { display: grid; gap: 9px; padding: 22px; background: linear-gradient(125deg, #fff0f0, #fbe3f1); }
.setup-copy > img { width: 44px; height: 44px; border-radius: 12px; }
.setup-copy > p { color: #62545a; font-size: 14px; }
.setup-note { display: flex; align-items: center; gap: 6px; color: #a43e57; font-size: 12px; }
.setup-form { display: grid; gap: 12px; padding: 20px; }
.setup-actions { display: grid; gap: 8px; margin-top: 5px; }
.confirm-dialog { width: min(360px, calc(100% - 36px)); border: 0; border-radius: 13px; background: white; padding: 20px; color: var(--ink); }
.confirm-dialog::backdrop { background: #0007; }
.confirm-dialog p { margin-top: 8px; color: var(--muted); }
.confirm-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.toast {
  position: fixed; z-index: 10; left: 50%; bottom: calc(var(--nav-height) + 14px); transform: translateX(-50%);
  width: max-content; max-width: min(90%, 390px); padding: 10px 14px; border-radius: 8px;
  color: white; background: var(--forest-deep); font-size: 13px;
}
