:root {
  --ink: #17232c;
  --muted: #65727b;
  --line: #d7e1e5;
  --paper: #f5f8f6;
  --card: #ffffff;
  --sea: #0d5f70;
  --deep: #0d3846;
  --leaf: #6f8f56;
  --sun: #d99a3d;
  --warn: #a85032;
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.65) 360px),
    var(--paper);
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(13, 56, 70, 0.04);
}

.top-photo {
  position: relative;
  min-height: 42vh;
  overflow: hidden;
  isolation: isolate;
}

.top-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 21, 27, 0.08), rgba(6, 21, 27, 0.28) 42%, rgba(6, 21, 27, 0.84)),
    linear-gradient(90deg, rgba(8, 40, 45, 0.72), rgba(8, 40, 45, 0.2));
}

.top-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 42vh;
  flex-direction: column;
  justify-content: flex-end;
  padding: max(22px, env(safe-area-inset-top)) 22px 26px;
  color: #fff;
}

.eyebrow,
.card-kicker,
.info-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.eyebrow {
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 11em;
  margin-top: 12px;
  font-size: clamp(34px, 10vw, 46px);
  line-height: 1.04;
}

.top-content > p:last-child {
  max-width: 26em;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  line-height: 1.45;
}

.content-stack {
  display: grid;
  gap: 12px;
  padding: 14px 14px 92px;
}

article {
  border: 1px solid rgba(13, 56, 70, 0.1);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 14px 40px rgba(25, 57, 66, 0.08);
}

.status-card,
.route-card,
.if-card,
.weather-card,
.note-card {
  padding: 16px;
}

.status-card {
  display: grid;
  gap: 8px;
  border-color: rgba(111, 143, 86, 0.24);
  background: #fbfdf9;
}

.status-card.rest {
  border-color: rgba(168, 80, 50, 0.22);
  background: #fffaf7;
}

.card-kicker,
.info-label {
  margin-bottom: 4px;
  color: var(--sea);
}

h2 {
  color: var(--deep);
  font-size: 20px;
  line-height: 1.25;
}

.status-card p:last-child,
.note-card p:last-child,
.weather-card p,
.info-grid p,
.route-line {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

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

.time-pill {
  flex: 0 0 auto;
  max-width: 118px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #eef5f6;
  color: var(--deep);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.route-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.route-stop {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #edf7f5;
  color: #18343c;
  font-size: 13px;
  font-weight: 700;
}

.route-arrow {
  align-self: center;
  color: #88a1a9;
  font-weight: 700;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.if-card {
  background: #fffdf8;
}

.if-options {
  display: grid;
  gap: 8px;
}

.if-option {
  width: 100%;
  padding: 10px;
  border: 1px solid #e3d6bd;
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  text-align: left;
}

.if-option strong {
  display: block;
  color: var(--deep);
  font-size: 14px;
}

.if-option span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.if-option.active {
  border-color: rgba(217, 154, 61, 0.72);
  background: #fff3d5;
}

.if-detail {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8f3e8;
  color: #654a24;
  font-size: 13px;
  line-height: 1.5;
}

.mini-button {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: #edf5f6;
  color: var(--deep);
  font-size: 12px;
  font-weight: 800;
}

.weather-card {
  background: #fbfcff;
}

.weather-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.weather-main strong {
  color: var(--deep);
  font-size: 36px;
  line-height: 1;
}

.weather-main span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.advice {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 4px solid var(--sun);
  border-radius: 8px;
  background: #fff9ee;
  color: #63451f !important;
}

.icon-button,
.floating-picker {
  display: inline-grid;
  place-items: center;
  border: 0;
  cursor: pointer;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #edf5f6;
  color: var(--deep);
}

.icon-button svg,
.floating-picker svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.floating-picker {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 30;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--deep);
  color: #fff;
  box-shadow: 0 12px 30px rgba(13, 56, 70, 0.36);
}

.floating-picker svg {
  width: 25px;
  height: 25px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(10, 22, 26, 0.45);
}

.date-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  width: min(100%, 520px);
  max-height: 76vh;
  margin: 0 auto;
  padding: 10px 14px max(18px, env(safe-area-inset-bottom));
  border-radius: 8px 8px 0 0;
  background: #fff;
  box-shadow: 0 -20px 60px rgba(13, 56, 70, 0.22);
  transform: translateY(105%);
  transition: transform 0.22s ease;
}

.date-sheet.open {
  transform: translateY(0);
}

.sheet-handle {
  width: 44px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #c6d3d8;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.date-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  max-height: calc(76vh - 92px);
  padding-bottom: 4px;
}

.today-option,
.date-option {
  display: grid;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.today-option {
  grid-template-columns: 46px 1fr;
  border-color: rgba(217, 154, 61, 0.36);
  background: #fff8ea;
}

.date-option {
  grid-template-columns: 70px 1fr 26px;
}

.date-option.active {
  border-color: rgba(13, 95, 112, 0.5);
  background: #eef8f6;
}

.today-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--sun);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.date-num {
  color: var(--deep);
  font-size: 17px;
  font-weight: 800;
}

.date-name {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.date-short {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.date-check {
  color: var(--sea);
  font-weight: 900;
  text-align: center;
}

@media (min-width: 560px) {
  body {
    padding: 20px 0;
  }

  .app-shell {
    overflow: hidden;
    border-radius: 8px;
  }

  .floating-picker {
    right: calc(50% - 242px);
  }
}
