:root {
  color-scheme: light;
  --ink: #203034;
  --muted: #6b746f;
  --page: #fff4dc;
  --paper: #fffaf0;
  --card: #ffffff;
  --line: rgba(116, 84, 48, 0.16);
  --sun: #f8bd4f;
  --coral: #ec6d57;
  --coral-deep: #c64b38;
  --teal: #177a83;
  --green: #477f52;
  --leaf: #6faf63;
  --pink: #ee8ca8;
  --sand: #f7ddaa;
  --water: #91d4dc;
  --violet: #7964c8;
  --shadow: 0 24px 58px rgba(89, 58, 32, 0.16);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: #f7e6c4;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 6%, rgba(248, 189, 79, 0.34), transparent 28%),
    radial-gradient(circle at 92% 14%, rgba(145, 212, 220, 0.38), transparent 32%),
    linear-gradient(180deg, #fff7e3 0%, #f7e6c4 56%, #e7f4ef 100%);
}

body.sheet-open {
  overflow: hidden;
}

button {
  font: inherit;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.trip-app {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 16px 44px;
}

.hero {
  padding: 10px 2px 18px;
}

.hero__topline {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: rgba(32, 48, 52, 0.66);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.soft-link,
.travel-button,
.task-button,
.sheet-close,
.sheet-back {
  min-height: 36px;
  border: 1px solid rgba(32, 48, 52, 0.12);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.72);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.soft-link {
  padding: 0 12px;
}

h1 {
  max-width: 10ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(3.2rem, 18vw, 5.9rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.hero__subtitle {
  max-width: 25rem;
  margin: 18px 0 16px;
  color: #50605d;
  font-size: 1.05rem;
  font-weight: 680;
  line-height: 1.45;
}

.countdown {
  display: inline-flex;
  gap: 9px;
  align-items: baseline;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(198, 75, 56, 0.16);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.78);
  box-shadow: 0 12px 28px rgba(89, 58, 32, 0.08);
}

.countdown span {
  color: var(--coral-deep);
  font-weight: 930;
}

.countdown small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.postcard {
  position: relative;
  min-height: 440px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid rgba(116, 84, 48, 0.14);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), transparent 38%),
    linear-gradient(145deg, #ffe6a6 0%, #f7d38a 43%, #a8dde1 100%);
  box-shadow: var(--shadow);
}

.postcard::before {
  position: absolute;
  inset: 14px;
  z-index: 5;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  content: "";
}

.postcard__sky,
.postcard__land,
.route-line {
  position: absolute;
  inset: 0;
}

.sun {
  position: absolute;
  top: 36px;
  right: 38px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 18px rgba(248, 189, 79, 0.16);
}

.cloud {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.72);
}

.cloud::before,
.cloud::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  background: inherit;
}

.cloud--one {
  top: 54px;
  left: 34px;
  width: 78px;
  height: 24px;
}

.cloud--one::before {
  left: 14px;
  top: -12px;
  width: 30px;
  height: 30px;
}

.cloud--one::after {
  right: 12px;
  top: -8px;
  width: 24px;
  height: 24px;
}

.cloud--two {
  top: 102px;
  right: 110px;
  width: 58px;
  height: 18px;
  opacity: 0.62;
}

.cloud--two::before {
  left: 10px;
  top: -8px;
  width: 22px;
  height: 22px;
}

.cloud--two::after {
  right: 8px;
  top: -6px;
  width: 18px;
  height: 18px;
}

.hill,
.sea,
.boat {
  position: absolute;
}

.hill {
  bottom: 92px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, #76b66c, var(--green));
}

.hill--one {
  left: -58px;
  width: 260px;
  height: 154px;
  transform: rotate(-7deg);
}

.hill--two {
  right: -68px;
  bottom: 84px;
  width: 310px;
  height: 186px;
  background: linear-gradient(180deg, #85c978, #3d8562);
  transform: rotate(9deg);
}

.sea {
  right: 0;
  bottom: 0;
  left: 0;
  height: 122px;
  background:
    radial-gradient(ellipse at 28% 10%, rgba(255, 255, 255, 0.42), transparent 40%),
    linear-gradient(180deg, rgba(255, 242, 194, 0.82), var(--water));
}

.boat {
  right: 70px;
  bottom: 72px;
  width: 58px;
  height: 18px;
  border-radius: 0 0 50px 50px;
  background: #7e4c29;
  transform: rotate(-6deg);
}

.boat::before {
  position: absolute;
  left: 28px;
  bottom: 14px;
  width: 2px;
  height: 42px;
  content: "";
  background: #7e4c29;
}

.boat::after {
  position: absolute;
  left: 31px;
  bottom: 20px;
  width: 32px;
  height: 28px;
  clip-path: polygon(0 0, 100% 44%, 0 100%);
  content: "";
  background: rgba(255, 250, 240, 0.76);
}

.route-stroke {
  position: absolute;
  z-index: 2;
  height: 6px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    90deg,
    var(--coral) 0 5px,
    transparent 5px 17px
  );
  transform-origin: left center;
}

.route-stroke::before {
  position: absolute;
  inset: -8px;
  z-index: -1;
  border-radius: inherit;
  content: "";
  background: rgba(236, 109, 87, 0.15);
}

.route-stroke--one {
  left: 23%;
  top: 65%;
  width: 32%;
  transform: rotate(-45deg);
}

.route-stroke--two {
  left: 44%;
  top: 40%;
  width: 28%;
  transform: rotate(33deg);
}

.route-stroke--three {
  left: 62%;
  top: 56%;
  width: 27%;
  transform: rotate(-33deg);
}

.postcard__copy {
  position: absolute;
  left: 24px;
  top: 22px;
  z-index: 3;
  max-width: 180px;
}

.eyebrow {
  margin: 0 0 5px;
  color: rgba(32, 48, 52, 0.58);
  font-size: 0.72rem;
  font-weight: 920;
  letter-spacing: 0;
  text-transform: uppercase;
}

.postcard h2,
.quiet-details h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.32rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.route-pin {
  position: absolute;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 92px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.route-pin span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  box-shadow: 0 14px 26px rgba(32, 48, 52, 0.18);
  font-size: 1rem;
  font-weight: 950;
}

.route-pin--chiang-mai span {
  background: var(--teal);
}

.route-pin--krabi span {
  background: var(--pink);
}

.route-pin strong {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.86);
  box-shadow: 0 8px 18px rgba(32, 48, 52, 0.08);
  font-size: 0.72rem;
  white-space: nowrap;
}

.route-pin--bangkok {
  left: 11%;
  top: 60%;
}

.route-pin--chiang-mai {
  left: 42%;
  top: 27%;
}

.route-pin--krabi {
  right: 8%;
  top: 49%;
}

.place-stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.place-card {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 16px 34px rgba(89, 58, 32, 0.1);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.place-card::after {
  position: absolute;
  right: -28px;
  bottom: -34px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  content: "";
  opacity: 0.62;
}

.place-card--bangkok::after {
  background: var(--sun);
}

.place-card--chiang::after {
  background: var(--leaf);
}

.place-card--krabi::after {
  background: var(--water);
}

.place-card__date {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.place-card strong {
  position: relative;
  z-index: 1;
  font-size: 1.45rem;
  line-height: 1;
}

.place-card span:last-child {
  position: relative;
  z-index: 1;
  max-width: 21rem;
  color: #5a6864;
  font-size: 0.92rem;
  font-weight: 670;
  line-height: 1.42;
}

.quiet-details {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 240, 0.72);
}

.quiet-actions {
  display: grid;
  gap: 8px;
  min-width: 118px;
}

.travel-button {
  min-width: 118px;
  padding: 0 14px;
  background: var(--ink);
  color: #fff;
}

.task-button {
  min-width: 118px;
  padding: 0 14px;
  background: rgba(255, 250, 240, 0.82);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(32, 48, 52, 0.34);
  backdrop-filter: blur(5px);
}

.bottom-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 101;
  max-height: min(82vh, 720px);
  overflow: hidden;
  border-radius: 28px 28px 0 0;
  background: var(--paper);
  box-shadow: 0 -26px 70px rgba(32, 48, 52, 0.28);
}

.sheet-handle {
  width: 54px;
  height: 5px;
  margin: 10px auto 2px;
  border-radius: 999px;
  background: rgba(32, 48, 52, 0.18);
}

.sheet-toolbar {
  display: flex;
  justify-content: space-between;
  min-height: 48px;
  padding: 6px 16px;
}

.sheet-close,
.sheet-back {
  min-width: 74px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.72);
}

.sheet-close {
  margin-left: auto;
}

.sheet-content {
  max-height: calc(min(82vh, 720px) - 70px);
  overflow: auto;
  padding: 4px 18px 28px;
}

.sheet-kicker {
  margin: 0 0 8px;
  color: var(--coral-deep);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sheet-content h2 {
  margin: 0;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}

.sheet-lede {
  margin: 12px 0 18px;
  color: #586762;
  font-size: 1rem;
  font-weight: 680;
  line-height: 1.45;
}

.sheet-section {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.sheet-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 13px 14px;
  border: 1px solid rgba(116, 84, 48, 0.14);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.task-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 58px;
  padding: 13px 14px;
  border: 1px solid rgba(116, 84, 48, 0.14);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
}

.task-row input {
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  accent-color: var(--coral-deep);
}

.task-row strong {
  display: block;
  font-size: 0.96rem;
}

.task-row span span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 670;
  line-height: 1.36;
}

.task-row:has(input:checked) {
  background: rgba(111, 175, 99, 0.13);
}

.task-row:has(input:checked) strong {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(70, 128, 82, 0.42);
}

.detail-row strong {
  display: block;
  font-size: 0.96rem;
}

.detail-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 670;
  line-height: 1.36;
}

.detail-row[data-clickable="true"] {
  cursor: pointer;
}

.detail-row[data-clickable="true"]::after {
  content: "Open";
  color: var(--coral-deep);
  font-size: 0.75rem;
  font-weight: 900;
}

.detail-note {
  margin: 0;
  padding: 14px;
  border-radius: 18px;
  background: rgba(248, 189, 79, 0.18);
  color: #665035;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

@media (min-width: 680px) {
  .bottom-sheet {
    right: calc((100vw - 620px) / 2);
    left: calc((100vw - 620px) / 2);
    border-radius: 28px;
    bottom: 18px;
  }
}

@media (max-width: 370px) {
  .trip-app {
    padding-right: 12px;
    padding-left: 12px;
  }

  .postcard {
    min-height: 410px;
  }

  .route-pin--krabi {
    right: 2%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .route-pin,
  .place-card,
  .travel-button,
  .task-button,
  .task-row,
  .detail-row {
    transition:
      transform 160ms ease,
      box-shadow 160ms ease,
      border-color 160ms ease;
  }

  .route-pin:active,
  .place-card:active,
  .travel-button:active,
  .task-button:active,
  .task-row:active,
  .detail-row:active {
    transform: scale(0.98);
  }
}
