:root {
  --ink: #14202b;
  --muted: #667382;
  --paper: #f5f1e8;
  --surface: #ffffff;
  --line: #ddd5c9;
  --sea: #1d6f84;
  --forest: #25634c;
  --wine: #9f3349;
  --gold: #c4893b;
  --navy: #17324d;
  --shadow: 0 16px 40px rgba(20, 32, 43, 0.16);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  margin: 0;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "PingFang SC",
    "Microsoft YaHei",
    "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: calc(82px + var(--safe-bottom));
}

.app-hero {
  position: relative;
  min-height: 46vh;
  overflow: hidden;
  background: var(--navy);
}

.app-hero img,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.app-hero img {
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(180deg, rgba(11, 21, 33, 0.18), rgba(11, 21, 33, 0.82)),
    linear-gradient(90deg, rgba(11, 21, 33, 0.68), rgba(11, 21, 33, 0.1));
}

.hero-text {
  position: absolute;
  left: max(22px, env(safe-area-inset-left));
  right: max(22px, env(safe-area-inset-right));
  bottom: 30px;
  color: #fff;
}

.hero-text p {
  margin: 0 0 8px;
  color: #ffdca5;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-text h1 {
  max-width: 740px;
  margin: 0 0 12px;
  font-size: clamp(2.25rem, 11vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-text span {
  display: block;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1rem;
  line-height: 1.7;
}

.screen {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 10px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.metric {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric strong {
  display: block;
  color: var(--navy);
  font-size: 1.65rem;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 0 14px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.45rem, 5vw, 2.25rem);
  line-height: 1.14;
  letter-spacing: 0;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.day-list,
.spot-grid,
.highlight-list,
.source-list {
  display: grid;
  gap: 14px;
}

.day-card,
.spot-card,
.highlight-card,
.source-card,
.detail-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(20, 32, 43, 0.07);
}

.day-card {
  display: grid;
  grid-template-columns: 124px 1fr;
  min-height: 142px;
  overflow: hidden;
}

.day-date {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  background: var(--navy);
  color: #fff;
}

.day-date strong {
  font-size: 1.35rem;
  letter-spacing: 0;
}

.day-date span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.86rem;
}

.day-body {
  min-width: 0;
  padding: 16px;
}

.day-body h3,
.spot-copy h3,
.highlight-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.day-meta,
.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(29, 111, 132, 0.1);
  color: var(--sea);
  font-size: 0.78rem;
  font-weight: 800;
}

.day-note,
.spot-copy p,
.detail-block p,
.highlight-card p,
.source-card p {
  color: var(--muted);
  line-height: 1.68;
}

.day-note {
  margin: 12px 0;
}

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

.mini-spot {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(159, 51, 73, 0.2);
  border-radius: 999px;
  background: rgba(159, 51, 73, 0.08);
  color: var(--wine);
  font-weight: 800;
}

.mini-spot span {
  display: block;
  color: rgba(159, 51, 73, 0.68);
  font-size: 0.7rem;
  font-weight: 750;
}

.search-bar {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 10px 0 12px;
  background: linear-gradient(180deg, var(--paper) 80%, rgba(245, 241, 232, 0));
}

.search-bar input {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.spot-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.spot-card {
  display: grid;
  min-height: 100%;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
}

.spot-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #d9d2c8;
}

.spot-copy {
  padding: 14px;
}

.spot-copy .region {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
}

.en-line {
  display: block;
  margin: -2px 0 9px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.35;
}

.detail-hero {
  position: relative;
  min-height: 42vh;
  margin: -28px calc((100vw - min(1120px, calc(100vw - 32px))) / -2) 24px;
  overflow: hidden;
  background: var(--navy);
}

.detail-hero img,
.detail-hero::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-hero img {
  object-fit: cover;
}

.detail-hero::after {
  content: "";
  background: linear-gradient(180deg, rgba(10, 18, 27, 0.14), rgba(10, 18, 27, 0.84));
}

.detail-title {
  position: absolute;
  z-index: 1;
  left: max(20px, calc((100vw - min(1120px, calc(100vw - 32px))) / 2));
  right: max(20px, calc((100vw - min(1120px, calc(100vw - 32px))) / 2));
  bottom: 22px;
  color: #fff;
}

.back-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-bottom: 16px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  font-weight: 900;
}

.detail-title h2 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 8vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.detail-title span {
  color: rgba(255, 255, 255, 0.82);
}

.detail-block {
  padding: 18px;
  margin-bottom: 14px;
}

.detail-block h3 {
  margin: 0 0 12px;
  font-size: 1.18rem;
}

.highlight-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.highlight-card {
  overflow: hidden;
  text-align: left;
  cursor: pointer;
}

.highlight-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.highlight-card div {
  padding: 14px;
}

.credit {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  line-height: 1.45;
}

.inline-credit {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.source-card {
  padding: 16px;
}

.source-card a {
  color: var(--sea);
  font-weight: 800;
  word-break: break-word;
}

.detail-block a,
.keyword-list a {
  color: var(--sea);
  font-weight: 850;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.guide-list {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.65;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.keyword-list a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(29, 111, 132, 0.1);
  text-decoration: none;
}

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

.bottom-tabs {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px max(14px, env(safe-area-inset-left)) calc(10px + var(--safe-bottom)) max(14px, env(safe-area-inset-right));
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(23, 50, 77, 0.92);
  backdrop-filter: blur(18px);
}

.tab-button {
  min-height: 48px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.tab-button.active {
  background: #fff;
  color: var(--navy);
}

@media (display-mode: standalone) {
  .app-hero {
    padding-top: env(safe-area-inset-top);
  }
}

@media (max-width: 840px) {
  .summary-strip,
  .spot-grid,
  .highlight-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .screen {
    width: calc(100% - 24px);
    padding-top: 20px;
  }

  .app-hero {
    min-height: 50vh;
  }

  .summary-strip,
  .spot-grid,
  .highlight-list {
    grid-template-columns: 1fr;
  }

  .day-card {
    grid-template-columns: 92px 1fr;
  }

  .day-date {
    padding: 14px 12px;
  }

  .day-date strong {
    font-size: 1.1rem;
  }

  .detail-hero {
    min-height: 48vh;
  }
}
