:root {
  --sky: #8bd7f6;
  --sky-soft: #dff7ff;
  --sea: #2ba6b8;
  --sea-deep: #177487;
  --sun: #ffd45c;
  --coral: #ff765f;
  --melon: #8fdc8a;
  --banana: #fff1a8;
  --cream: #fff8df;
  --card: #fffdf2;
  --ink: #253c45;
  --muted: #667b81;
  --line: #21313a;
  --soft-line: rgba(37, 60, 69, 0.16);
  --shadow: 0 10px 0 rgba(37, 60, 69, 0.14), 0 22px 50px rgba(23, 116, 135, 0.17);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 212, 92, 0.55), transparent 11rem),
    radial-gradient(circle at 82% 3%, rgba(255, 118, 95, 0.22), transparent 12rem),
    linear-gradient(180deg, var(--sky-soft) 0 34rem, #effce9 34rem 58rem, #fff3cf 58rem);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.28;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255, 255, 255, 0.42) 25%, transparent 25%);
  background-position: 0 0, 14px 0;
  background-size: 28px 28px;
}

button,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 4px solid rgba(255, 212, 92, 0.8);
  outline-offset: 3px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 16px clamp(14px, 4vw, 48px) 72px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(139, 215, 246, 0.98), rgba(223, 247, 255, 0.78)),
    linear-gradient(90deg, rgba(255, 248, 223, 0.62), transparent);
}

.hero::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -44px;
  height: 104px;
  background:
    radial-gradient(ellipse at 25% 12%, #ffffff 0 34%, transparent 35%),
    radial-gradient(ellipse at 52% 18%, #ffffff 0 30%, transparent 31%),
    radial-gradient(ellipse at 78% 10%, #ffffff 0 32%, transparent 33%);
}

.topbar,
.hero-grid,
main {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 950;
}

.brand::before {
  content: "✦";
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 8px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 3px 3px 0 var(--line);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.text-button,
.map-link,
.day-tab {
  border: 2px solid var(--line);
  box-shadow: 4px 4px 0 var(--line);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.icon-button:active,
.text-button:active,
.map-link:active,
.day-tab:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--line);
}

.icon-button,
.text-button {
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.icon-button {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  font-size: 24px;
  line-height: 1;
}

.text-button {
  min-height: 46px;
  border-radius: 16px;
  padding: 0 14px;
  font-weight: 950;
}

.text-button.solid {
  background: var(--sea-deep);
  color: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 320px) minmax(260px, 0.78fr);
  gap: clamp(18px, 4vw, 48px);
  align-items: center;
  padding: clamp(30px, 8vw, 78px) 0 10px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--sea-deep);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: 0;
}

h1 {
  max-width: 640px;
  font-size: clamp(42px, 10vw, 90px);
  text-shadow: 4px 4px 0 rgba(255, 255, 255, 0.72);
}

h2 {
  font-size: clamp(28px, 7vw, 52px);
}

.hero-copy {
  max-width: 620px;
  margin: 16px 0 0;
  color: #3f5b63;
  font-size: clamp(16px, 3.8vw, 20px);
  line-height: 1.7;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-badges span,
.tag {
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--banana);
  color: var(--ink);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 2px 2px 0 var(--line);
}

.cartoon-scene {
  position: relative;
  min-height: 250px;
  border: 3px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(180deg, #9fe7ff 0 50%, #61c8d3 50% 70%, #ffe7a1 70%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sun {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 58px;
  height: 58px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 10px rgba(255, 212, 92, 0.32);
  animation: bob 3.4s ease-in-out infinite;
}

.cloud,
.cloud::before,
.cloud::after {
  position: absolute;
  border: 3px solid var(--line);
  background: #fff;
}

.cloud {
  width: 72px;
  height: 28px;
  border-radius: 999px;
}

.cloud::before,
.cloud::after {
  content: "";
  bottom: 8px;
  border-radius: 50%;
}

.cloud::before {
  left: 10px;
  width: 28px;
  height: 28px;
}

.cloud::after {
  right: 12px;
  width: 35px;
  height: 35px;
}

.cloud-one {
  top: 42px;
  left: 24px;
}

.cloud-two {
  top: 88px;
  right: 62px;
  transform: scale(0.72);
}

.sea-line {
  position: absolute;
  left: -18px;
  right: -18px;
  bottom: 65px;
  height: 20px;
  background:
    radial-gradient(circle at 12px 10px, transparent 0 10px, var(--line) 11px 12px, transparent 13px) 0 0 / 36px 20px repeat-x;
}

.train {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 76px;
  display: flex;
  gap: 7px;
  animation: floatTrain 4s ease-in-out infinite;
}

.train span {
  flex: 1;
  height: 48px;
  border: 3px solid var(--line);
  border-radius: 18px 18px 10px 10px;
  background: var(--coral);
  box-shadow: 4px 4px 0 rgba(37, 60, 69, 0.28);
}

.train span:nth-child(2) {
  background: var(--sun);
}

.train span:nth-child(3) {
  background: var(--melon);
}

.family {
  position: absolute;
  left: 46px;
  bottom: 20px;
  display: flex;
  align-items: end;
  gap: 11px;
}

.family i {
  display: block;
  width: 18px;
  height: 42px;
  border: 3px solid var(--line);
  border-radius: 999px 999px 8px 8px;
  background: var(--sea);
}

.family i::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  margin: -18px 0 0 -5px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: #ffd6ad;
}

.family i:nth-child(2) {
  height: 34px;
  background: var(--coral);
}

.family i:nth-child(3) {
  height: 28px;
  background: var(--sun);
}

.family i:nth-child(4) {
  height: 24px;
  background: var(--melon);
}

.hero-card {
  padding: 20px;
  border: 3px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.card-label {
  display: block;
  width: fit-content;
  margin-bottom: 12px;
  padding: 5px 9px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--melon);
  font-size: 12px;
  font-weight: 950;
}

.hero-card strong {
  display: block;
  font-size: clamp(22px, 5vw, 30px);
  line-height: 1.28;
}

.hero-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

main {
  width: min(1060px, calc(100% - 22px));
  margin: -30px auto 88px;
}

.section-shell {
  margin-top: 18px;
  padding: clamp(16px, 4vw, 28px);
  border: 3px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 242, 0.92);
  box-shadow: var(--shadow);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  background: var(--cream);
}

.summary-strip article {
  min-height: 104px;
  padding: 16px;
  border: 2px dashed rgba(37, 60, 69, 0.34);
  border-radius: 18px;
  background: #ffffff;
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 8px;
}

.summary-strip strong {
  display: block;
  font-size: clamp(20px, 5vw, 31px);
  line-height: 1.12;
}

.section-title {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 360px);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.section-title > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.day-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 9px;
  overflow-x: auto;
  margin: 0 -8px 12px;
  padding: 9px 8px 13px;
  background: linear-gradient(180deg, rgba(255, 253, 242, 0.96), rgba(255, 253, 242, 0.78));
  scrollbar-width: none;
}

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

.day-tab {
  flex: 0 0 auto;
  min-height: 48px;
  border-radius: 17px;
  padding: 8px 13px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 950;
}

.day-tab small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.day-tab[aria-selected="true"] {
  background: var(--sun);
}

.day-mood {
  margin: 2px 0 14px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #eafff2;
  color: #315d43;
  font-weight: 900;
  line-height: 1.55;
  box-shadow: 3px 3px 0 var(--line);
}

.timeline {
  display: grid;
  gap: 13px;
}

.stop-card {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 5px 5px 0 rgba(37, 60, 69, 0.22);
  animation: rise 420ms ease both;
}

.stop-card::before {
  content: "";
  position: absolute;
  left: 21px;
  top: -7px;
  width: 42px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--banana);
  transform: rotate(-4deg);
}

.stop-time {
  display: grid;
  place-items: center;
  align-self: start;
  min-height: 58px;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #dff7ff;
  color: var(--sea-deep);
  font-size: 14px;
  font-weight: 950;
  text-align: center;
  line-height: 1.15;
}

.stop-card h3 {
  margin: 0 0 8px;
  font-size: clamp(20px, 5vw, 27px);
  line-height: 1.25;
}

.stop-card p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
  white-space: pre-line;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 46px;
  padding: 0 15px;
  border-radius: 16px;
  background: var(--coral);
  color: #fff;
  text-decoration: none;
  font-weight: 950;
}

.map-link::before {
  content: "⌖";
  margin-right: 7px;
  font-weight: 950;
}

.rainy {
  margin-top: 12px;
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: #e8f5ff;
}

.rainy strong {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--sea-deep);
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-shell .text-button {
  background: #fff;
}

.editor-shell .text-button.solid {
  background: var(--sea-deep);
  color: #fff;
}

.editor-shell .text-button.quiet {
  background: #fff7d1;
}

.editor-toolbar {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.editor-toolbar label,
.edit-stop-card label,
.rainy-editor > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.editor-toolbar select,
.edit-stop-card input,
.edit-stop-card textarea,
.raw-editor textarea {
  width: 100%;
  border: 3px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  color: var(--ink);
  background: #fffdf5;
  font-size: 16px;
  line-height: 1.45;
  box-shadow: inset 4px 4px 0 rgba(37, 60, 69, 0.08);
}

.edit-stop-card textarea,
.raw-editor textarea {
  resize: vertical;
}

.stop-editor-list {
  display: grid;
  gap: 14px;
}

.edit-stop-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 5px 5px 0 rgba(37, 60, 69, 0.18);
}

.edit-stop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.edit-stop-head strong {
  display: inline-flex;
  padding: 6px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--banana);
  font-size: 14px;
}

.edit-stop-card label {
  display: grid;
  gap: 6px;
}

.rainy-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 2px dashed rgba(37, 60, 69, 0.38);
  border-radius: 18px;
  background: #e8f5ff;
}

.mini-danger {
  min-height: 38px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #ffe2dc;
  color: var(--ink);
  font-weight: 950;
  box-shadow: 3px 3px 0 var(--line);
}

.raw-editor {
  margin-top: 14px;
  border: 2px dashed rgba(37, 60, 69, 0.38);
  border-radius: 18px;
  padding: 12px;
  background: #fff7d1;
}

.raw-editor summary {
  cursor: pointer;
  font-weight: 950;
}

.raw-editor textarea {
  min-height: 340px;
  margin-top: 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.editor-hint {
  color: var(--muted);
  line-height: 1.6;
}

.editor-bottom-bar {
  position: sticky;
  bottom: 10px;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 16px -4px -4px;
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 242, 0.96);
  box-shadow: var(--shadow);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 5;
  transform: translateX(-50%) translateY(130%);
  width: min(520px, calc(100% - 24px));
  padding: 13px 16px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: var(--sun);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--line);
  font-weight: 950;
  text-align: center;
  transition: transform 220ms ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px) rotate(-0.4deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@keyframes bob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(7px);
  }
}

@keyframes floatTrain {
  0%, 100% {
    transform: translateX(0) rotate(-1deg);
  }
  50% {
    transform: translateX(8px) rotate(1deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }

  .cartoon-scene {
    order: -1;
    min-height: 210px;
  }

  .hero-card {
    transform: rotate(0);
  }

  .section-title,
  .summary-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body {
    background:
      radial-gradient(circle at 22% 4%, rgba(255, 212, 92, 0.48), transparent 8rem),
      linear-gradient(180deg, var(--sky-soft) 0 30rem, #effce9 30rem 58rem, #fff3cf 58rem);
  }

  .hero {
    padding: 12px 12px 54px;
  }

  .topbar {
    align-items: center;
  }

  .brand {
    font-size: 15px;
  }

  .brand::before {
    width: 30px;
    height: 30px;
    margin-right: 6px;
  }

  .icon-button,
  .text-button {
    min-height: 44px;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  .text-button {
    padding-inline: 11px;
  }

  h1 {
    font-size: clamp(42px, 15vw, 62px);
  }

  .hero-copy {
    font-size: 16px;
  }

  .cartoon-scene {
    min-height: 178px;
    border-radius: 24px;
  }

  .cloud-two {
    display: none;
  }

  .train {
    left: 18px;
    right: 18px;
    bottom: 68px;
  }

  .train span {
    height: 40px;
  }

  .family {
    left: 32px;
    transform: scale(0.86);
    transform-origin: left bottom;
  }

  main {
    width: min(100% - 18px, 1060px);
    margin-top: -24px;
  }

  .section-shell {
    border-radius: 22px;
    padding: 13px;
  }

  .summary-strip {
    gap: 8px;
  }

  .summary-strip article {
    min-height: 84px;
    padding: 13px;
  }

  .section-title {
    margin-bottom: 12px;
  }

  .editor-actions {
    justify-content: stretch;
    margin-top: 12px;
  }

  .editor-actions .text-button {
    flex: 1 1 42%;
  }

  .editor-bottom-bar {
    grid-template-columns: 1fr 0.72fr;
    bottom: 8px;
  }

  .section-title > p {
    margin-top: 8px;
    font-size: 14px;
  }

  .day-tabs {
    top: 0;
    margin-inline: -7px;
  }

  .stop-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px;
  }

  .stop-time {
    width: fit-content;
    min-height: 42px;
    padding: 7px 12px;
  }

  .map-link {
    width: 100%;
  }

  .hero-card strong {
    font-size: 22px;
  }
}
