:root {
  --asw-bg: #faf6ee;
  --asw-card: #fffdf9;
  --asw-border: #e6dac6;
  --asw-ink: #241e1a;
  --asw-muted: #6e6055;
  --asw-red: #b43225;
  --asw-red-soft: #fdf0ee;
  --asw-green: #1f6f50;
  --asw-green-soft: #eef8f3;
  --asw-amber: #a16610;
  --asw-amber-soft: #fef6e7;
}

.asw-main,
.asw-main *,
.asw-main *::before,
.asw-main *::after {
  box-sizing: border-box;
}

.asw-main {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 14px 16px 28px;
  color: var(--asw-ink);
  background: var(--asw-bg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

.asw-header {
  margin-bottom: 12px;
}

.asw-header h1 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--asw-red);
}

.asw-subline {
  font-size: 13px;
  color: var(--asw-muted);
}

.asw-hero {
  background: var(--asw-card);
  border: 1px solid var(--asw-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.asw-hero.is-good {
  background: var(--asw-green-soft);
  border-color: #b9decb;
}

.asw-hero.is-warn {
  background: var(--asw-amber-soft);
  border-color: #ecd19b;
}

.asw-hero.is-bad {
  background: var(--asw-red-soft);
  border-color: #ebc2bc;
}

.asw-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.asw-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--asw-amber);
}

.asw-badge.is-good {
  background: var(--asw-green);
}

.asw-badge.is-bad {
  background: var(--asw-red);
}

.asw-hero-meta {
  font-size: 13px;
  color: var(--asw-muted);
  font-variant-numeric: tabular-nums;
}

.asw-hero-summary {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}

.asw-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.asw-clash-pill {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--asw-border);
}

.asw-jump-btn {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--asw-red);
  background: #fff;
  color: var(--asw-red);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.asw-dock {
  background: var(--asw-card);
  border: 1px solid var(--asw-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asw-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--asw-muted);
  margin-bottom: 6px;
}

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

.asw-chip {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--asw-border);
  background: #fff;
  color: var(--asw-ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.asw-chip.is-active {
  background: var(--asw-red);
  border-color: var(--asw-red);
  color: #fff;
}

.asw-dock-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.asw-field {
  min-width: 0;
}

.asw-control {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 16px;
  color: var(--asw-ink);
  background: #fff;
  border: 1px solid var(--asw-border);
  border-radius: 10px;
}

.asw-date-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.asw-date-wrap .asw-control {
  flex: 1;
  min-width: 0;
}

.asw-mini-btn {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--asw-border);
  background: #f5efe3;
  color: var(--asw-ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.asw-win-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.asw-win-btn {
  min-height: 44px;
  padding: 6px 4px;
  border-radius: 10px;
  border: 1px solid var(--asw-border);
  background: #fff;
  color: var(--asw-ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.asw-win-btn.is-active {
  background: var(--asw-ink);
  border-color: var(--asw-ink);
  color: #fff;
}

.asw-card {
  background: var(--asw-card);
  border: 1px solid var(--asw-border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.asw-insp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.asw-insp-date {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.asw-week {
  font-size: 14px;
  font-weight: 500;
  color: var(--asw-muted);
}

.asw-insp-lunar {
  font-size: 13px;
  color: var(--asw-muted);
  margin-top: 2px;
}

.asw-score-box {
  min-width: 72px;
  text-align: center;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--asw-amber-soft);
  color: var(--asw-amber);
  border: 1px solid #ecd19b;
}

.asw-score-box.is-good {
  background: var(--asw-green-soft);
  color: var(--asw-green);
  border-color: #b9decb;
}

.asw-score-box.is-bad {
  background: var(--asw-red-soft);
  color: var(--asw-red);
  border-color: #ebc2bc;
}

.asw-score-num {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.asw-score-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
}

.asw-insp-note {
  font-size: 14px;
  background: #f8f3e9;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.asw-taboo-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.asw-taboo-box span {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--asw-red-soft);
  color: var(--asw-red);
  font-weight: 600;
}

.asw-kv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.asw-kv {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #efe6d6;
  font-size: 13px;
}

.asw-kv span {
  color: var(--asw-muted);
  flex-shrink: 0;
}

.asw-kv strong {
  text-align: right;
  font-weight: 600;
}

.asw-hours-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--asw-muted);
}

.asw-hours-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.asw-hour-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f5efe3;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.asw-hour-chip.is-prime {
  background: var(--asw-green-soft);
  border: 1px solid #b9decb;
  color: var(--asw-green);
  font-weight: 600;
}

.asw-hour-chip em {
  font-style: normal;
  font-size: 12px;
  opacity: 0.85;
}

.asw-muted {
  font-size: 13px;
  color: var(--asw-muted);
}

.asw-copy-bar {
  margin-bottom: 14px;
}

.asw-primary-btn {
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: var(--asw-red);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.asw-copy-tip {
  margin-top: 6px;
  font-size: 13px;
  color: var(--asw-green);
  text-align: center;
  min-height: 18px;
}

.asw-list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.asw-list-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.asw-count {
  font-size: 12px;
  color: var(--asw-muted);
  font-variant-numeric: tabular-nums;
}

.asw-days-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.asw-day-row {
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--asw-border);
  background: #fff;
  color: var(--asw-ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.asw-day-row.is-active {
  border-color: var(--asw-red);
  background: var(--asw-red-soft);
}

.asw-day-main {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.asw-day-main span {
  font-size: 12px;
  font-weight: 500;
  color: var(--asw-muted);
}

.asw-top-tag {
  font-style: normal;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--asw-green);
  color: #fff;
  margin-left: 4px;
}

.asw-day-sub {
  font-size: 12px;
  color: var(--asw-muted);
  margin-top: 2px;
}

.asw-day-right {
  text-align: right;
  flex-shrink: 0;
}

.asw-day-god {
  font-size: 13px;
  font-weight: 600;
  color: var(--asw-red);
}

.asw-day-hour {
  font-size: 12px;
  color: var(--asw-muted);
  font-variant-numeric: tabular-nums;
}

.asw-empty {
  padding: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--asw-muted);
  background: #f8f3e9;
  border-radius: 10px;
}

.asw-empty-btn {
  display: inline-block;
  margin-top: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--asw-red);
  background: #fff;
  color: var(--asw-red);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.asw-rel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.asw-rel a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--asw-card);
  border: 1px solid var(--asw-border);
  color: var(--asw-ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.asw-footnote p {
  margin: 0;
  font-size: 12px;
  color: var(--asw-muted);
  line-height: 1.6;
}

@media (min-width: 600px) {
  .asw-chip-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .asw-dock-row {
    grid-template-columns: 1fr 1fr;
  }
  .asw-kv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
