@media screen {
  :root {
    color-scheme: light;
    --ink: #193d36;
    --muted: #63746e;
    --pine: #123f37;
    --pine-2: #205c4d;
    --sand: #f6f3ec;
    --paper: #fffefa;
    --line: #e5e9e1;
    --gold: #e8aa58;
    --coral: #bc604c;
    --shadow: 0 18px 55px rgba(27, 53, 42, .08);
  }

  html { scroll-padding-top: 132px; }
  body { margin: 0; background: var(--sand); color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; font-size: 16px; line-height: 1.72; }
  body::before { content: ""; position: fixed; z-index: -1; inset: 0; pointer-events: none; background: radial-gradient(circle at 10% 0%, #e6eee6 0, transparent 30%), radial-gradient(circle at 90% 45%, #f8e8d5 0, transparent 32%); }
  h1, h2, h3 { color: inherit; letter-spacing: -.035em; }
  h1 { font-size: clamp(2.55rem, 5.2vw, 5.5rem); line-height: 1.08; }
  h2 { font-size: clamp(1.55rem, 2.5vw, 2.2rem); line-height: 1.27; margin: 0 0 1.25rem; padding: 0; border: 0; color: var(--ink); }
  h3 { font-size: clamp(1.07rem, 1.6vw, 1.3rem); line-height: 1.35; margin: 1.7rem 0 .75rem; color: var(--ink); }
  p { margin: 0 0 1rem; }
  a { color: var(--pine-2); text-decoration: none; }
  a:hover { color: #a45437; }
  a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

  .site-nav { position: sticky; z-index: 50; top: 0; height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(24px, calc((100vw - 1220px) / 2)); background: rgba(255, 254, 250, .92); border-bottom: 1px solid rgba(25, 61, 54, .08); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .site-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 850; letter-spacing: -.035em; font-size: 1.08rem; white-space: nowrap; }
  .site-brand:hover { color: var(--ink); }
  .brand-mark { display: grid; place-items: center; width: 33px; height: 33px; flex: none; border-radius: 10px; background: var(--pine); color: #fff7dd; font-size: 19px; font-weight: 400; }
  .site-nav-links { display: flex; align-items: center; gap: 5px; }
  .site-nav-links a { color: #526a61; font-size: .91rem; font-weight: 700; padding: 10px 15px; border-radius: 99px; white-space: nowrap; }
  .site-nav-links a:hover, .site-nav-links a[aria-current="page"] { color: var(--pine); background: #eaf0e9; }
  .site-nav-links .nav-alert { color: #96503d; background: #fff0e4; }
  .site-nav-links .nav-alert:hover, .site-nav-links .nav-alert[aria-current="page"] { color: #86432f; background: #ffe7d2; }
  .site-footer { max-width: 1180px; margin: 26px auto 0; padding: 0 4px 45px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .85rem; }
  .site-footer a { font-weight: 700; }

  .jumpbar { max-width: 1180px; margin: 26px auto 18px; display: flex; align-items: center; gap: 7px; padding: 7px; overflow-x: auto; background: rgba(255, 254, 250, .9); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 7px 24px rgba(27, 53, 42, .04); scrollbar-width: none; }
  .jumpbar::-webkit-scrollbar { display: none; }
  .jumpbar-label { flex: none; padding: 0 13px; color: #85938a; font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
  .jumpbar a { flex: none; padding: 8px 13px; border-radius: 10px; color: #536960; font-size: .88rem; font-weight: 700; white-space: nowrap; }
  .jumpbar a:hover, .jumpbar a.is-active { background: var(--pine); color: white; }

  body[data-page="itinerary"] > .page, body[data-page="reminders"] > .page { max-width: 1180px; min-height: 0; margin: 0 auto 24px; padding: clamp(25px, 4.2vw, 52px); position: relative; page-break-after: auto; background: var(--paper); border: 1px solid rgba(34, 72, 58, .07); border-radius: 25px; box-shadow: var(--shadow); }
  body[data-page="itinerary"] > .page:last-of-type, body[data-page="reminders"] > .page:last-of-type { margin-bottom: 0; }
  .page .footer { display: none; }
  .eyebrow { color: var(--gold); font-size: .85rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
  .lead { font-size: clamp(1.07rem, 1.5vw, 1.22rem); line-height: 1.72; }

  body[data-page="itinerary"] > .cover, body[data-page="reminders"] > .cover { overflow: hidden; color: white; background: linear-gradient(104deg, rgba(9, 42, 37, .93) 0%, rgba(16, 54, 47, .84) 51%, rgba(14, 43, 41, .47) 100%), url("assets/scenic/08_duku_north.jpg") center 55% / cover; border: 0; }
  .cover h1 { max-width: 12ch; color: #fffdf6; margin-bottom: 22px; }
  .cover .lead { max-width: 660px; color: #e4ebe5; }
  .cover .lead strong { color: white; }
  .cover .chips { display: flex; gap: 9px; flex-wrap: wrap; margin: 26px 0; }
  .cover .chip { display: inline-flex; align-items: center; padding: 7px 12px; border: 1px solid rgba(255, 255, 255, .24); border-radius: 99px; background: rgba(255, 255, 255, .12); color: #fff; font-size: .78rem; font-weight: 700; backdrop-filter: blur(8px); }
  .cover .box { color: #713828; background: #fff8e9; border-color: var(--gold); }

  body[data-page="itinerary"] > .cover { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .9fr); align-items: center; column-gap: 42px; }
  body[data-page="itinerary"] > .cover > .eyebrow, body[data-page="itinerary"] > .cover > h1, body[data-page="itinerary"] > .cover > .lead, body[data-page="itinerary"] > .cover > .chips { grid-column: 1; }
  body[data-page="itinerary"] > .cover h1 { max-width: none; font-size: clamp(2.65rem, 4.3vw, 4rem); }
  body[data-page="itinerary"] > .cover .map-link { grid-column: 2; grid-row: 1 / span 4; display: block; align-self: center; width: 100%; padding: 13px; color: var(--pine); background: #fffefa; border-radius: 19px; box-shadow: 0 22px 60px rgba(0, 0, 0, .23); }
  body[data-page="itinerary"] > .cover .map-link:hover { color: #9a5337; }
  body[data-page="itinerary"] > .cover .map-link .map { display: block; width: 100%; max-height: none; height: auto; margin: 0; padding: 0; object-fit: contain; background: transparent; border-radius: 8px; box-shadow: none; }
  .map-link span { display: block; padding: 7px 4px 2px; text-align: right; font-size: .76rem; font-weight: 800; }
  body[data-page="itinerary"] > .cover > .box { grid-column: 1 / -1; margin-top: 24px; }
  body[data-page="reminders"] > .cover { background: linear-gradient(105deg, rgba(20, 45, 40, .96), rgba(29, 69, 58, .82) 65%, rgba(30, 64, 53, .5)), url("assets/scenic/05_bayinbuluk.jpg") center / cover; }
  body[data-page="reminders"] > .cover h1 { max-width: none; }
  body[data-page="reminders"] > .cover .hero { max-width: 760px; margin: 25px 0; padding: 15px 20px; text-align: left; font-size: clamp(1.05rem, 1.8vw, 1.4rem); line-height: 1.5; font-weight: 800; color: #fff3dd; border: 1px solid rgba(255, 194, 130, .5); border-left: 5px solid var(--gold); border-radius: 12px; background: rgba(90, 50, 30, .5); }
  .countdown { grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 30px 0 24px; }
  .countdown .card { min-height: 112px; padding: 17px 18px; background: rgba(255, 255, 255, .95); border: 0; box-shadow: 0 5px 20px rgba(0, 0, 0, .08); }
  .countdown .date { color: #a45836; font-size: 1.2rem; font-weight: 850; }
  .countdown .action { color: var(--ink); font-size: .9rem; line-height: 1.45; }

  .page:not(.cover) > h2, .dayhead h2 { padding: 0 0 15px; border: 0; border-bottom: 1px solid var(--line); }
  .page:not(.cover) > h2::before, .dayhead h2::before { content: "FIELD NOTES  /  V4"; display: block; margin-bottom: 8px; color: #a88459; font-size: .68rem; font-weight: 900; letter-spacing: .18em; }
  .dayhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
  .dayhead h2 { flex: 1; margin: 0; }
  .dayhead .km { flex: none; margin-bottom: 15px; color: var(--muted); font-size: .85rem; font-weight: 700; }
  .dayhero { display: grid; gap: 12px; height: clamp(205px, 26vw, 300px); margin: 0 0 23px; }
  .dayhero.two { grid-template-columns: 1fr 1fr; }
  .dayhero.three { grid-template-columns: 1.35fr 1fr 1fr; }
  .dayhero.one { grid-template-columns: 1fr; }
  .shot { border-radius: 16px; box-shadow: none; }
  .shot img { transition: transform .4s ease; }
  .shot:hover img { transform: scale(1.035); }
  .shot figcaption { padding: 35px 18px 14px; font-size: 1rem; line-height: 1.3; }
  .shot figcaption small { display: block; margin-top: 3px; font-size: .76rem; }

  table { width: 100%; border-spacing: 0; border-collapse: separate; margin: 18px 0 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 3px 16px rgba(25, 61, 54, .025); }
  table th, table td, .compact td, .tight td { padding: 12px 15px; border: 0; border-bottom: 1px solid var(--line); font-size: .9rem; line-height: 1.55; vertical-align: top; }
  table tr:last-child td { border-bottom: 0; }
  table th { background: #eaf0e8; color: var(--pine); font-size: .8rem; font-weight: 850; letter-spacing: .02em; }
  table tbody tr:nth-child(even) { background: #fbfcf8; }
  table tbody tr:hover { background: #f4f8f2; }
  table td:first-child { color: var(--pine); font-weight: 800; white-space: nowrap; }
  .booking-table td:nth-child(2) { width: 40%; }
  .booking-table .addr { font-size: .82rem; line-height: 1.5; color: var(--muted); }
  .status, .tag { display: inline-flex; align-items: center; padding: 3px 9px; margin-top: 5px; border-radius: 99px; font-size: .72rem; font-weight: 800; }
  .time { color: #9a5337; }

  .box, .nav, .hotel, .booked, .route { margin: 18px 0; padding: 16px 20px; border-radius: 13px; font-size: .91rem; line-height: 1.65; }
  .box { border-left: 4px solid #d39b62; background: #fff8ed; }
  .box.danger { border-color: #d07868; background: #fff1ed; color: #6c392f; }
  .box.good { border-color: #6ba88a; background: #edf8f0; }
  .box.blue { border-color: #73a9ba; background: #eef7f8; }
  .box.purple { border-color: #a896c4; background: #f7f3fb; }
  .nav, .route { background: #edf4ef; }
  .hotel, .booked { background: #f6f2fa; border: 1px solid #e9e2f1; }
  .nav a { display: inline-flex; margin: 3px 2px; padding: 4px 10px; border: 1px solid #d3e4d6; border-radius: 99px; background: white; color: var(--pine); font-weight: 750; }
  .nav a:hover { background: var(--pine); color: white; }
  .grid2 { gap: 14px; margin: 16px 0; }
  .card { padding: 20px 22px; border: 1px solid var(--line); border-radius: 15px; background: #fbfcf8; }
  .card h3 { margin-top: 0; }
  .sources { font-size: .85rem; line-height: 1.55; overflow-wrap: anywhere; }
  .sources li { margin: 9px 0; }
  .small, .tiny { font-size: .83rem; color: var(--muted); }
  .phone { white-space: nowrap; }

  body[data-page="home"] { background: var(--sand); }
  .home-wrap { max-width: 1220px; margin: auto; padding: 24px 20px 70px; }
  .home-hero { position: relative; overflow: hidden; min-height: 580px; display: flex; align-items: flex-end; padding: clamp(28px, 6vw, 76px); border-radius: 27px; background: linear-gradient(90deg, rgba(11, 39, 37, .83), rgba(15, 54, 48, .47) 60%, rgba(16, 52, 46, .1)), linear-gradient(0deg, rgba(11, 39, 37, .6), transparent 50%), url("assets/scenic/01_sayram.png") center 51% / cover; color: white; box-shadow: var(--shadow); }
  .home-hero::after { content: ""; position: absolute; width: 300px; height: 300px; right: -110px; top: -140px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%; box-shadow: 0 0 0 35px rgba(255,255,255,.045), 0 0 0 85px rgba(255,255,255,.035); pointer-events: none; }
  .home-hero-content { position: relative; z-index: 1; max-width: 720px; }
  .home-kicker, .section-kicker { display: block; margin-bottom: 16px; font-size: .78rem; font-weight: 850; letter-spacing: .19em; text-transform: uppercase; }
  .home-kicker { color: #f5c47e; }
  .home-hero h1 { max-width: 11ch; margin: 0 0 20px; color: white; font-size: clamp(3.6rem, 7vw, 7.5rem); line-height: 1.05; }
  .home-hero p { max-width: 590px; color: #e8f0ec; font-size: clamp(1.05rem, 1.5vw, 1.23rem); line-height: 1.7; }
  .home-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 31px; }
  .button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 51px; padding: 12px 19px; border-radius: 12px; font-size: .94rem; font-weight: 850; transition: transform .2s, background .2s, color .2s; }
  .button:hover { transform: translateY(-2px); }
  .button-primary { background: #f3be79; color: #233e32; }
  .button-primary:hover { background: #ffcc88; color: #233e32; }
  .button-ghost { color: white; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .45); backdrop-filter: blur(6px); }
  .button-ghost:hover { color: white; background: rgba(255, 255, 255, .24); }
  .home-stats { display: flex; flex-wrap: wrap; gap: 25px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .3); }
  .home-stats span { color: #d9e5dc; font-size: .88rem; }
  .home-stats strong { display: block; color: white; font-size: 1.45rem; line-height: 1.25; }
  .home-section { margin-top: 58px; }
  .section-kicker { color: #a67845; }
  .home-section h2 { max-width: 670px; margin-bottom: 23px; font-size: clamp(1.9rem, 3.5vw, 3rem); border: 0; }
  .home-section .section-intro { max-width: 690px; color: var(--muted); }
  .route-rail { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-top: 30px; }
  .route-stop { position: relative; padding: 19px 15px 18px; min-height: 117px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 24px rgba(25, 61, 54, .035); }
  .route-stop::before { content: ""; position: absolute; top: -1px; left: 17px; width: 35px; height: 3px; background: var(--gold); border-radius: 0 0 4px 4px; }
  .route-stop span { display: block; margin-bottom: 12px; color: #a57c50; font-size: .76rem; font-weight: 850; }
  .route-stop strong { display: block; font-size: .98rem; line-height: 1.35; }
  .feature-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; margin-top: 26px; }
  .feature-card { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 330px; padding: 31px; border-radius: 20px; color: white; background-size: cover; background-position: center; isolation: isolate; }
  .feature-card::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, rgba(12, 39, 35, .9), rgba(13, 45, 41, .18) 75%); transition: background .2s; }
  .feature-card:hover { color: white; }
  .feature-card:hover::before { background: linear-gradient(0deg, rgba(12, 39, 35, .96), rgba(13, 45, 41, .34) 75%); }
  .feature-card:first-child { background-image: url("assets/scenic/08_duku_north.jpg"); }
  .feature-card:last-child { background-image: url("assets/scenic/04_nalati.jpg"); }
  .feature-card .feature-meta { color: #f6c789; font-size: .77rem; font-weight: 850; letter-spacing: .13em; }
  .feature-card h3 { margin: 9px 0 7px; color: white; font-size: clamp(1.5rem, 2.4vw, 2.25rem); }
  .feature-card p { max-width: 500px; color: #e1ebe5; font-size: .91rem; }
  .feature-card .feature-arrow { display: inline-flex; align-items: center; gap: 8px; margin-top: 13px; font-size: .88rem; font-weight: 800; }
  .home-notice { display: flex; align-items: flex-start; gap: 16px; margin-top: 24px; padding: 20px 23px; border: 1px solid #f0ded0; border-radius: 16px; background: #fff8ef; color: #795340; }
  .home-notice b { flex: none; color: #9a6546; }
}

@media screen and (max-width: 900px) {
  body[data-page="itinerary"] > .cover { display: block; }
  body[data-page="itinerary"] > .cover .map-link { display: block; max-width: 650px; margin: 28px 0 0; }
  .route-rail { grid-template-columns: repeat(4, 1fr); }
  .countdown { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 640px) {
  html { scroll-padding-top: 112px; }
  body { font-size: 15px; line-height: 1.65; }
  .site-nav { height: 60px; padding: 0 14px; }
  .site-brand { gap: 7px; font-size: .91rem; }
  .brand-mark { width: 29px; height: 29px; border-radius: 8px; font-size: 17px; }
  .site-nav-links { gap: 1px; }
  .site-nav-links a { padding: 7px 7px; font-size: .73rem; }
  .jumpbar { margin: 11px 12px 13px; padding: 5px; border-radius: 12px; }
  .jumpbar-label { display: none; }
  .jumpbar a { padding: 7px 10px; font-size: .77rem; }
  body[data-page="itinerary"] > .page, body[data-page="reminders"] > .page { margin: 0 12px 14px; padding: 22px 19px 24px; border-radius: 18px; }
  body[data-page="itinerary"] > .cover, body[data-page="reminders"] > .cover { background-position: center; }
  .cover h1 { font-size: clamp(2.55rem, 10.8vw, 3.8rem); }
  .cover .lead { font-size: 1rem; }
  .cover .chips { gap: 6px; margin: 20px 0; }
  .cover .chip { padding: 5px 9px; font-size: .7rem; }
  body[data-page="itinerary"] > .cover h1 { font-size: clamp(2.55rem, 10.8vw, 3.8rem); }
  body[data-page="itinerary"] > .cover .map-link { margin-top: 19px; padding: 5px; border-radius: 12px; }
  body[data-page="reminders"] > .cover .hero { margin: 18px 0; padding: 11px 13px; font-size: 1rem; }
  .countdown { gap: 8px; margin: 20px 0; }
  .countdown .card { min-height: 110px; padding: 12px; border-radius: 10px; }
  .countdown .date { font-size: 1.02rem; }
  .countdown .action { font-size: .78rem; }
  h2 { font-size: 1.48rem; }
  h3 { font-size: 1.08rem; }
  .dayhead { display: block; margin-bottom: 12px; }
  .dayhead h2 { margin-bottom: 7px; }
  .dayhead .km { display: block; margin: 0; font-size: .8rem; }
  .dayhero { display: flex; gap: 9px; height: 193px; margin: 14px -19px 20px; padding: 0 19px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .dayhero::-webkit-scrollbar { display: none; }
  .dayhero .shot { flex: 0 0 75%; scroll-snap-align: start; border-radius: 12px; }
  .dayhero.one .shot { flex-basis: 100%; }
  .dayhero .shot figcaption { padding: 30px 13px 11px; font-size: .9rem; }

  table, table tbody, table tr, table td { display: block; width: 100%; }
  table { margin: 16px 0 19px; padding: 0; border: 0; box-shadow: none; overflow: visible; }
  table thead { display: none; }
  table tbody tr { display: block; margin: 0 0 9px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcf9; }
  table tbody tr:nth-child(even) { background: #fbfcf9; }
  table tbody tr:hover { background: #f4f8f2; }
  table td, table.compact td, table.tight td, table.booking-table td { display: block; position: relative; padding: 10px 1px 10px 88px; min-height: 43px; border: 0; border-bottom: 1px solid var(--line); font-size: .85rem; white-space: normal; overflow-wrap: anywhere; }
  table td:last-child { border-bottom: 0; }
  table td::before { content: attr(data-label); position: absolute; top: 12px; left: 1px; width: 75px; color: #8b988c; font-size: .7rem; font-weight: 800; letter-spacing: .03em; }
  table td:first-child { white-space: normal; }
  .booking-table td:nth-child(2) { width: 100%; }
  .booking-table .addr { font-size: .8rem; }
  .box, .nav, .hotel, .booked, .route { margin: 14px 0; padding: 13px 15px; font-size: .83rem; border-radius: 10px; }
  .nav a { margin: 3px 1px; padding: 4px 8px; font-size: .79rem; }
  .grid2 { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .card { padding: 16px; }
  .sources { font-size: .76rem; }

  .home-wrap { padding: 12px 12px 46px; }
  .home-hero { min-height: 660px; padding: 29px 24px; border-radius: 18px; background-position: 52% center; }
  .home-hero h1 { font-size: clamp(3.35rem, 14vw, 5.2rem); }
  .home-hero p { font-size: .97rem; }
  .home-actions { gap: 9px; }
  .button { min-height: 45px; padding: 10px 13px; font-size: .8rem; }
  .home-stats { gap: 15px; }
  .home-stats span { font-size: .75rem; }
  .home-stats strong { font-size: 1.2rem; }
  .home-section { margin-top: 42px; }
  .home-section h2 { font-size: 2rem; }
  .route-rail { display: flex; gap: 9px; margin: 21px -12px 0; padding: 0 12px 7px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .route-rail::-webkit-scrollbar { display: none; }
  .route-stop { flex: 0 0 138px; min-height: 111px; scroll-snap-align: start; }
  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .feature-card { min-height: 270px; padding: 23px; border-radius: 15px; }
  .home-notice { display: block; padding: 16px; font-size: .83rem; }
  .home-notice b { display: block; margin-bottom: 5px; }
  .site-footer { margin: 10px 12px 0; padding-bottom: 25px; display: block; font-size: .75rem; }
}

@media print {
  .site-nav, .jumpbar, .site-footer { display: none !important; }
}
