:root {
  --green: #2d6a4f;
  --green-light: #40916c;
  --green-bg: #f0f7f4;
  --green-pale: #d8f3dc;
  --text: #1b4332;
  --text-muted: #52796f;
  --card: #fff;
  --shadow: 0 4px 20px rgba(45, 106, 79, 0.1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  background: var(--green-bg);
  color: var(--text);
  line-height: 1.55;
  padding-bottom: calc(64px + var(--safe-bottom));
}

.hidden {
  display: none !important;
}

.page {
  padding: 12px 16px 24px;
  max-width: 480px;
  margin: 0 auto;
}

.hero {
  background: linear-gradient(145deg, #40916c, #2d6a4f);
  border-radius: 16px;
  padding: 24px 20px;
  color: #fff;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.hero-sub {
  font-size: 0.875rem;
  opacity: 0.92;
  margin-bottom: 12px;
}

.hero-day h1 {
  font-size: 1.25rem;
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.22);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  margin-bottom: 8px;
}

.hero-meta {
  font-size: 0.75rem;
  opacity: 0.88;
}

.back-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.875rem;
  display: inline-block;
  margin-bottom: 8px;
}

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.muted {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.tag {
  display: inline-block;
  font-size: 0.6875rem;
  background: var(--green-pale);
  color: var(--green);
  padding: 3px 10px;
  border-radius: 999px;
  margin: 4px 6px 4px 0;
}

.tags {
  margin: 8px 0;
}

.today-card {
  border-left: 4px solid var(--green-light);
}

.label {
  font-size: 0.75rem;
  color: var(--green-light);
  font-weight: 600;
  margin-bottom: 6px;
}

.theme {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 6px;
}

.link-hint {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.clickable {
  cursor: pointer;
}

.clickable:active {
  opacity: 0.92;
}

.why-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.why-row:last-child {
  margin-bottom: 0;
}

.why-icon {
  font-size: 1.5rem;
}

.weather-card {
  border-left: 4px solid #74c69d;
}

.weather-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.weather-now {
  text-align: right;
}

.temp-big {
  font-size: 2rem;
  font-weight: 700;
  color: var(--green);
  display: block;
  line-height: 1.1;
}

.weather-detail {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 8px 0 12px;
}

.forecast {
  border-top: 1px solid #eef4f0;
  padding-top: 10px;
}

.forecast-item {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 0.5fr;
  gap: 4px;
  font-size: 0.75rem;
  padding: 6px 0;
  border-bottom: 1px solid #f5f9f7;
}

.forecast-item .rain {
  color: #457b9d;
}

.weather-loading {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.btn-call,
.btn-map,
.btn-primary,
.btn-ghost {
  border: none;
  border-radius: 999px;
  font-size: 0.8125rem;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: inherit;
}

.btn-call {
  background: linear-gradient(135deg, #52b788, #2d6a4f);
  color: #fff;
}

.btn-call-sm {
  font-size: 0.75rem;
  padding: 8px 12px;
}

.btn-map {
  background: #e8f4ef;
  color: var(--green);
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-light), var(--green));
  color: #fff;
  width: 100%;
  margin-top: 12px;
}

.btn-ghost {
  background: #fff;
  color: var(--text-muted);
  border: 1px solid #dce8e2;
}

.btn-ghost:disabled {
  opacity: 0.35;
}

.btn-ghost.full {
  width: 100%;
  margin: 0 16px 24px;
  max-width: calc(480px - 32px);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.day-card.active {
  border: 2px solid var(--green-light);
  background: linear-gradient(135deg, #fff, #f4fbf7);
}

.day-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 4px;
}

.day-num {
  font-weight: 700;
  color: var(--green);
  font-size: 0.875rem;
}

.day-card h2 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.timeline-block {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--green-pale);
}

.period {
  font-size: 0.6875rem;
  color: var(--green-light);
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-block h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.timeline-block .item {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.spot-name {
  font-weight: 600;
  margin-top: 8px;
  font-size: 0.875rem;
}

.warn {
  color: #b08900;
  font-size: 0.8125rem;
  margin-top: 4px;
}

.day-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.day-nav .btn-ghost {
  flex: 1;
}

.info-tabs {
  display: flex;
  background: #fff;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.info-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 4px;
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
}

.info-tab.on {
  background: var(--green);
  color: #fff;
  font-weight: 600;
}

.progress {
  height: 8px;
  background: var(--green-pale);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 6px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--green-light), var(--green));
  transition: width 0.3s;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eef4f0;
  cursor: pointer;
  font-size: 0.9375rem;
}

.check-row:last-child {
  border-bottom: none;
}

.check-row.done span {
  color: var(--text-muted);
  text-decoration: line-through;
}

.check-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: #fff;
  border-top: 1px solid #e8f0ec;
  padding-bottom: var(--safe-bottom);
  z-index: 100;
  max-width: 480px;
  margin: 0 auto;
}

.tabbar button {
  flex: 1;
  border: none;
  background: none;
  padding: 10px 0 8px;
  font-size: 0.6875rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
}

.tabbar button.on {
  color: var(--green);
  font-weight: 600;
}

.tabbar button em {
  font-style: normal;
  display: block;
  font-size: 1.125rem;
  line-height: 1.2;
}

.tabbar button span {
  display: block;
  font-size: 0.6875rem;
  margin-top: 2px;
}

.fab-call {
  position: fixed;
  right: 16px;
  bottom: calc(72px + var(--safe-bottom));
  background: linear-gradient(135deg, #e76f51, #d62828);
  color: #fff;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(214, 40, 40, 0.35);
  z-index: 99;
}

.fab-call:active {
  transform: scale(0.96);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + var(--safe-bottom));
  transform: translateX(-50%) translateY(20px);
  background: rgba(27, 67, 50, 0.92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.8125rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200;
  max-width: 90%;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hotel-quick {
  border: 1px solid var(--green-pale);
}

@media (min-width: 481px) {
  .tabbar,
  .fab-call {
    right: calc(50% - 240px + 16px);
  }
}
