:root {
  color-scheme: light;
  --bg: #f7f5ee;
  --paper: #fffdf7;
  --paper-strong: #ffffff;
  --ink: #252421;
  --muted: #68645b;
  --line: #ded8ca;
  --accent: #0f766e;
  --accent-soft: #d9f0eb;
  --rail: #9d2f37;
  --bus: #b56415;
  --walk: #5d6f2f;
  --stay: #5b4a8f;
  --shadow: 0 12px 32px rgba(56, 48, 32, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 18px 14px 92px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto 14px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

h2,
h3,
p {
  margin-top: 0;
}

.icon-button,
.pill-button,
.tab-button,
.day-button,
.mini-button {
  border: 1px solid var(--line);
  background: var(--paper-strong);
  color: var(--ink);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  box-shadow: 0 5px 18px rgba(58, 48, 28, 0.08);
}

.icon-button svg,
.tab-button svg,
.mini-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.status-band,
.day-strip,
.view {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.status-band {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.status-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.status-main {
  display: grid;
  gap: 6px;
}

.status-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.status-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.pill-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 14px;
  scrollbar-width: none;
}

.day-strip::-webkit-scrollbar {
  display: none;
}

.day-button {
  display: grid;
  gap: 3px;
  min-width: 78px;
  padding: 9px 10px;
  border-radius: var(--radius);
  text-align: left;
  background: var(--paper);
}

.day-button strong {
  font-size: 14px;
}

.day-button span {
  color: var(--muted);
  font-size: 11px;
}

.day-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.view {
  display: grid;
  gap: 14px;
}

.layout-grid {
  display: grid;
  gap: 14px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.panel-body {
  padding: 12px 14px 14px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 10px;
}

.event-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  background: var(--paper-strong);
}

.event-card[data-kind="rail"] {
  border-left-color: var(--rail);
}

.event-card[data-kind="bus"] {
  border-left-color: var(--bus);
}

.event-card[data-kind="walk"] {
  border-left-color: var(--walk);
}

.event-card[data-kind="stay"] {
  border-left-color: var(--stay);
}

.event-top {
  display: grid;
  grid-template-columns: minmax(64px, max-content) 1fr;
  gap: 10px;
}

.event-time {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.25;
}

.event-main h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.35;
}

.event-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfaf5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.tag.important {
  border-color: rgba(157, 47, 55, 0.3);
  background: #f8e7e5;
  color: var(--rail);
}

.route-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius);
  background: #f3efe4;
}

.route-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.route-node {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--paper-strong);
  color: var(--ink);
  font-weight: 700;
}

.event-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.mini-button.is-done {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.note-input {
  width: 100%;
  min-height: 54px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 10px;
  background: #fffefa;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.summary-list,
.check-list,
.compact-list {
  display: grid;
  gap: 8px;
}

.summary-item,
.check-item,
.compact-item {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
}

.summary-item strong,
.check-item strong,
.compact-item strong {
  font-size: 13px;
  line-height: 1.35;
}

.summary-item span,
.check-item span,
.compact-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.pass-grid {
  display: grid;
  gap: 10px;
}

.pass-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
}

.pass-card h3 {
  margin: 0;
  font-size: 15px;
}

.progress {
  overflow: hidden;
  height: 8px;
  border-radius: 99px;
  background: #e5dfd1;
}

.progress > span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  background: var(--accent);
}

.transport-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 20;
  min-width: min(320px, calc(100vw - 28px));
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: var(--radius);
  background: #ecf7f3;
  color: #164c45;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.tabbar {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-width: 640px;
  margin: 0 auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.tab-button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 48px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.tab-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.empty-state {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

@media (min-width: 760px) {
  .app-shell {
    padding: 28px 24px 96px;
  }

  h1 {
    font-size: 31px;
  }

  .status-card {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .layout-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    align-items: start;
  }

  .event-top {
    grid-template-columns: 94px 1fr;
  }
}

@media (min-width: 1120px) {
  .tabbar {
    top: 28px;
    right: 24px;
    bottom: auto;
    left: auto;
    width: 360px;
  }

  .topbar {
    padding-right: 390px;
  }
}
