:root {
  --bg: #e9eef6;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --line: #dbe4f0;
  --text: #172033;
  --muted: #6b7890;
  --blue: #2f5fd7;
  --blue-soft: #e8efff;
  --rose: #d84b65;
  --rose-soft: #ffe8ee;
  --shadow: 0 18px 48px -28px rgba(21, 34, 62, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top, rgba(47, 95, 215, 0.14), transparent 32%),
    linear-gradient(180deg, #edf2f8 0%, #e4ebf4 100%);
  color: var(--text);
}

button {
  font: inherit;
}

.desktop-shell {
  min-height: 100dvh;
  padding: 0;
  background: var(--bg);
}

.phone-frame {
  width: 100%;
  max-width: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.phone-screen {
  min-height: 100dvh;
  border-radius: 0;
  background: var(--bg);
}

.status-bar {
  display: none;
}

.status-pill {
  width: 124px;
  height: 4px;
  border-radius: 999px;
  background: #c8d3e2;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding:
    calc(14px + env(safe-area-inset-top))
    14px
    calc(24px + env(safe-area-inset-bottom))
    14px;
}

.hero {
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(47, 95, 215, 0.98), rgba(28, 72, 186, 0.92)),
    linear-gradient(180deg, #2f5fd7 0%, #214fbf 100%);
  color: #ffffff;
  padding: 18px 16px 16px;
  box-shadow: var(--shadow);
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hero-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-date {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.92;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.install-btn {
  border: none;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 20px -18px rgba(15, 23, 42, 0.38);
}

.install-btn:active {
  transform: translateY(1px);
}

.hero-subtitle {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
}

.hero-alerts {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.hero-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
}

.hero-alert strong {
  font-size: 14px;
  white-space: nowrap;
}

.section {
  margin-top: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.section-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.section-title span {
  font-size: 12px;
  color: var(--muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.summary-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 14px 12px 12px;
  box-shadow: var(--shadow);
}

.summary-card::after {
  content: "";
  position: absolute;
  top: -10px;
  right: -16px;
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: var(--accent-soft);
  opacity: 0.78;
}

.summary-card.warn::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--rose);
  box-shadow: 0 0 0 4px rgba(216, 75, 101, 0.14);
  z-index: 1;
}

.summary-card-label,
.summary-card-value,
.summary-card-note {
  position: relative;
  z-index: 1;
}

.summary-card-label {
  font-size: 12px;
  color: var(--muted);
}

.summary-card-value {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.summary-card-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.warning-panel {
  border-radius: 22px;
  border: 1px solid #f1c6d0;
  background: linear-gradient(180deg, #fff7f9 0%, #fff1f4 100%);
  padding: 14px;
  box-shadow: var(--shadow);
}

.warning-list {
  display: grid;
  gap: 9px;
}

.warning-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  padding: 10px 12px;
}

.warning-badge {
  flex-shrink: 0;
  min-width: 42px;
  border-radius: 999px;
  background: var(--rose);
  color: #ffffff;
  text-align: center;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.department-card {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow);
}

.department-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.department-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.department-today {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.department-tag {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.member-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.member-row {
  border-radius: 18px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  padding: 11px 12px;
}

.member-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.member-name {
  min-width: 48px;
  font-size: 15px;
  font-weight: 800;
}

.member-content {
  min-width: 0;
  flex: 1;
}

.task-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 13px;
  line-height: 1.65;
}

.task-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
}

.task-chip strong {
  font-size: 14px;
}

.recent-chip {
  font-size: 11px;
  color: var(--muted);
}

.today-none {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eff3f8;
  color: #556174;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
}

.stuck-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--rose-soft);
  color: var(--rose);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}

.thumb-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.thumb {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 10px 18px -14px rgba(15, 23, 42, 0.45);
  position: relative;
  padding: 0;
  background: transparent;
}

.thumb img,
.preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top, #f8fafc 0%, #e2e8f0 100%);
  color: #97a3b6;
  font-size: 11px;
}

.recent-line,
.finance-note,
.empty-state {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.empty-state {
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.55);
  padding: 18px 12px;
  text-align: center;
}

.activity-panel,
.info-panel,
.loading-panel,
.error-panel {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--shadow);
}

.activity-list,
.store-list,
.download-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.activity-item,
.store-item,
.download-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.activity-thumb,
.store-thumb {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.65);
  padding: 0;
  background: transparent;
}

.activity-title,
.store-title,
.download-title {
  font-size: 14px;
  font-weight: 700;
}

.activity-subtitle,
.store-meta,
.download-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.store-actions,
.download-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-left: auto;
}

.action-btn,
.retry-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: var(--blue);
  white-space: nowrap;
}

.secondary-btn {
  color: var(--text);
  background: #edf2fb;
}

.footer-note {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.guide-mask,
.preview-mask {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.52);
  padding: 18px;
  z-index: 30;
}

.guide-mask.show,
.preview-mask.show {
  display: flex;
}

.guide-card,
.preview-card {
  width: 100%;
  max-width: 360px;
  border-radius: 26px;
  background: var(--panel);
  padding: 18px 16px 16px;
  box-shadow: 0 24px 60px -28px rgba(15, 23, 42, 0.35);
}

.preview-card {
  max-width: 92vw;
  padding: 10px;
}

.guide-card h3,
.error-panel h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.guide-card p,
.error-panel p,
.loading-panel p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.guide-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.guide-item {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 10px 12px;
}

.guide-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.guide-actions,
.error-actions,
.preview-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.guide-close,
.preview-close {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--blue);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.loading-panel,
.error-panel {
  text-align: center;
}

@media (max-width: 420px) {
  .page {
    max-width: none;
    padding:
      calc(14px + env(safe-area-inset-top))
      12px
      calc(22px + env(safe-area-inset-bottom))
      12px;
  }
}
