/* Travel Sign · Lingyin Temple fortune sticks and the Wish Tree (/travel-sign.html). */
@font-face {
  font-family: "TS Brush";
  src: url("/fonts/travel-sign/ma-shan-zheng-subset.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ts-night: #1c120b;
  --ts-umber: #2a1a10;
  --ts-ochre: #6b3e1f;
  --ts-red: #a32a24;
  --ts-red-hi: #c23a2c;
  --ts-gold: #d4a65a;
  --ts-gold-hi: #f1d39a;
  --ts-paper: #f3ede2;
  --ts-ink: #2b1f17;
  --ts-ink-soft: #5d4b3d;
  --ts-line: rgb(107 62 31 / 22%);
  --ts-brush: "TS Brush", "Ma Shan Zheng", "STKaiti", "KaiTi", serif;
  --ts-serif: "Fraunces", Georgia, "Noto Serif SC", serif;
  --ts-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ts-ease: cubic-bezier(.22, .8, .24, 1);
}

html { background: var(--ts-night) !important; }
body.ts-body {
  margin: 0;
  min-height: 100svh;
  background: var(--ts-night) !important;
  color: #f7efe2;
  font-family: var(--ts-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.ts-body *, .ts-body *::before, .ts-body *::after { box-sizing: border-box; }
.ts-body [hidden] { display: none !important; }
.ts-body button { font: inherit; color: inherit; cursor: pointer; }
.ts-body a { color: inherit; }
.ts-body :focus-visible { outline: 2px solid var(--ts-gold-hi); outline-offset: 3px; }

.ts-app { position: fixed; inset: 0; overflow: hidden; }

/* ---------- Scenes ---------- */
.ts-scene {
  position: absolute; inset: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  padding: max(14px, env(safe-area-inset-top)) clamp(14px, 3vw, 36px) max(16px, env(safe-area-inset-bottom));
  transition: opacity .9s var(--ts-ease), filter .9s var(--ts-ease), transform .9s var(--ts-ease);
}
.ts-bg {
  position: absolute; inset: -2%;
  background-size: cover; background-position: center 30%;
  z-index: -2;
  transition: filter 1s var(--ts-ease), transform 1.4s var(--ts-ease);
}
.ts-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 55%, transparent 30%, rgb(20 11 5 / 62%) 100%),
    linear-gradient(180deg, rgb(20 11 5 / 55%) 0%, rgb(20 11 5 / 8%) 28%, rgb(20 11 5 / 18%) 62%, rgb(20 11 5 / 82%) 100%);
}
.ts-bg-temple { background-image: url("/images/travel-sign/temple-gate.webp"); }
.ts-bg-tree { background-image: url("/images/travel-sign/wish-tree.webp"); background-position: center 20%; }
@media (max-aspect-ratio: 4/5) {
  .ts-bg-temple { background-image: url("/images/travel-sign/temple-gate-portrait.webp"); background-position: center 20%; }
  .ts-bg-tree { background-image: url("/images/travel-sign/wish-tree-portrait.webp"); }
}
.ts-app.is-dim .ts-temple .ts-bg { filter: blur(7px) brightness(.45) saturate(.85); transform: scale(1.04); }
.ts-app.is-dim .ts-temple > :not(.ts-bg):not(.ts-leaves) { opacity: .0; pointer-events: none; }
.ts-app.is-dim .ts-tree .ts-bg { filter: blur(6px) brightness(.45); }
.ts-app.is-dim .ts-tree > :not(.ts-bg):not(.ts-leaves) { opacity: .25; pointer-events: none; }
.ts-app.is-dim .ts-tree .ts-tags { opacity: .35; filter: blur(2px); }
.ts-temple > *, .ts-tree > * { transition: opacity .6s var(--ts-ease), filter .6s var(--ts-ease); }
.ts-scene.is-leaving { opacity: 0; filter: blur(6px); transform: scale(1.03); pointer-events: none; }
.ts-scene.is-entering { opacity: 0; transform: scale(.98); }

/* ---------- Top bar ---------- */
.ts-top {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: relative; z-index: 5;
}
.ts-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--ts-serif); font-size: 17px; letter-spacing: .01em; text-shadow: 0 1px 8px rgb(0 0 0 / 50%); }
.ts-brand img { width: 34px; height: 34px; border-radius: 50%; background: #fff8ec; padding: 2px; }
.ts-top-actions { display: flex; align-items: center; gap: 10px; }
.ts-top-link { font-size: 13px; text-decoration: none; padding: 8px 14px; border-radius: 999px; background: rgb(28 18 11 / 45%); border: 1px solid rgb(241 211 154 / 28%); backdrop-filter: blur(8px); }
.ts-top-link:hover { border-color: var(--ts-gold); }
.ts-icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgb(28 18 11 / 45%); border: 1px solid rgb(241 211 154 / 28%); backdrop-filter: blur(8px); padding: 0; }
.ts-icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ts-icon-btn[aria-pressed="true"] .ts-mute { display: none; }
.ts-icon-btn[aria-pressed="true"] { border-color: var(--ts-gold); color: var(--ts-gold-hi); }

/* ---------- Heading ---------- */
.ts-heading { text-align: center; margin-top: clamp(2px, 1.5vh, 16px); position: relative; z-index: 3; max-width: 640px; }
.ts-zh { font-family: var(--ts-brush); font-weight: 400; line-height: 1; margin: 0; letter-spacing: .12em; }
.ts-zh-lg { font-size: clamp(30px, 4.6vh, 46px); color: var(--ts-gold-hi); text-shadow: 0 0 18px rgb(241 211 154 / 55%), 0 2px 6px rgb(0 0 0 / 60%); }
.ts-heading h1, .ts-heading h2 {
  font-family: var(--ts-serif); font-weight: 400; font-size: clamp(24px, 3.4vh, 34px); margin: 6px 0 4px;
  color: #fff8ec; text-shadow: 0 2px 14px rgb(0 0 0 / 65%);
}
.ts-sub { margin: 0; font-size: clamp(13px, 1.7vh, 15px); line-height: 1.5; color: rgb(255 244 226 / 86%); text-shadow: 0 1px 8px rgb(0 0 0 / 80%); }

/* ---------- Cylinder ---------- */
.ts-stage {
  position: relative; z-index: 2; width: 100%; min-height: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end;
  height: 100%;
}
.ts-cylinder {
  grid-column: 2;
  position: relative;
  /* Sized so the sticks stay below the 靈隱寺 plaque in the background. */
  height: clamp(210px, 36vh, 340px); aspect-ratio: 720 / 1598;
  padding: 0; border: 0; background: none;
  transform-origin: 50% 85%;
  animation: ts-breathe 4.2s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.ts-cylinder img { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.ts-cyl-sticks, .ts-cyl-body { position: absolute; inset: 0; }
.ts-cyl-sticks { z-index: 1; }
.ts-cyl-body { z-index: 3; }
.ts-cyl-sticks { clip-path: inset(0 0 66% 0); }
.ts-cyl-body { clip-path: inset(33.5% 0 0 0); filter: drop-shadow(0 26px 28px rgb(0 0 0 / 55%)); }
.ts-cyl-glow {
  position: absolute; left: 50%; top: 52%; width: 190%; aspect-ratio: 1; translate: -50% -50%;
  background: radial-gradient(circle, rgb(255 214 140 / 34%) 0%, rgb(255 190 100 / 12%) 38%, transparent 66%);
  opacity: .55; transition: opacity .5s; pointer-events: none;
}
.ts-cylinder:focus-visible .ts-cyl-glow { opacity: 1; }
.ts-flying-stick {
  /* Starts level with the bundle; the barrel (z-index 3) hides everything below the rim. */
  position: absolute; z-index: 2; left: 46.5%; top: 4%; width: 7.5% !important; height: auto !important;
  opacity: 0; pointer-events: none; transform-origin: 50% 100%;
}
.ts-cylinder.is-shaking { animation: ts-shake 1.45s cubic-bezier(.36, .07, .19, .97) both; }
.ts-cylinder.is-shaking .ts-cyl-sticks { animation: ts-jostle .16s linear infinite; }
.ts-cylinder.is-shaking .ts-cyl-glow { opacity: 1; }
.ts-cylinder.is-launching .ts-flying-stick { animation: ts-launch 1.2s linear forwards; }
.ts-cyl-hint { margin: 6px 0 0; font-size: 13px; letter-spacing: .06em; color: rgb(255 240 214 / 88%); text-shadow: 0 1px 8px #000; z-index: 2; min-height: 1.4em; }

@keyframes ts-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ts-shake {
  0% { transform: rotate(0); }
  8% { transform: rotate(-9deg) translateX(-6px); }
  18% { transform: rotate(8deg) translateX(6px) translateY(-6px); }
  28% { transform: rotate(-10deg) translateX(-8px); }
  38% { transform: rotate(9deg) translateX(8px) translateY(-8px); }
  48% { transform: rotate(-8deg) translateX(-6px); }
  58% { transform: rotate(10deg) translateX(7px) translateY(-5px); }
  68% { transform: rotate(-7deg) translateX(-5px); }
  78% { transform: rotate(6deg) translateX(4px); }
  88% { transform: rotate(-3deg); }
  100% { transform: rotate(0); }
}
@keyframes ts-jostle {
  0% { transform: translateY(0); } 25% { transform: translateY(-2.5%) rotate(.6deg); }
  50% { transform: translateY(.5%); } 75% { transform: translateY(-1.8%) rotate(-.6deg); } 100% { transform: translateY(0); }
}
/* One stick works its way up out of the bundle, pauses, then flies off. */
@keyframes ts-launch {
  0% { opacity: 0; transform: translateY(0); filter: none; animation-timing-function: ease-out; }
  6% { opacity: 1; transform: translateY(-2%) rotate(-1deg); animation-timing-function: cubic-bezier(.3, .7, .4, 1); }
  52% { opacity: 1; transform: translateY(-30%) rotate(1.5deg); filter: drop-shadow(0 0 10px rgb(255 214 140 / 90%)); animation-timing-function: ease-in-out; }
  62% { opacity: 1; transform: translateY(-27%) rotate(0); filter: drop-shadow(0 0 14px rgb(255 224 160 / 100%)); animation-timing-function: cubic-bezier(.55, 0, .8, .2); }
  100% { opacity: 1; transform: translateY(-340%) rotate(8deg); filter: drop-shadow(0 0 18px rgb(255 230 170 / 100%)); }
}

/* ---------- Side pills ---------- */
.ts-side {
  justify-self: center; align-self: end; margin-bottom: 8%; display: grid; justify-items: center; gap: 10px;
  padding: 16px 10px; border-radius: 999px; width: 50px;
  background: rgb(28 18 11 / 50%); border: 1px solid rgb(241 211 154 / 32%); backdrop-filter: blur(8px);
  transition: border-color .3s, background .3s;
}
.ts-side:hover { border-color: var(--ts-gold); background: rgb(60 34 18 / 60%); }
.ts-side svg { width: 22px; height: 22px; fill: none; stroke: var(--ts-gold-hi); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ts-side span { writing-mode: vertical-rl; font-size: 12.5px; letter-spacing: .14em; }
.ts-side-left { grid-column: 1; justify-self: end; margin-right: clamp(12px, 8vw, 120px); }
.ts-side-right { grid-column: 3; justify-self: start; margin-left: clamp(12px, 8vw, 120px); }
.ts-side.is-on { border-color: var(--ts-gold); color: var(--ts-gold-hi); }

/* ---------- Ask bar ---------- */
.ts-ask {
  position: relative; z-index: 3; margin-top: 10px;
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; justify-content: center;
  padding: 10px 16px 12px; border-radius: 18px; max-width: min(1240px, calc(100% - 200px));
  background: rgb(24 14 8 / 58%); border: 1px solid rgb(241 211 154 / 22%); backdrop-filter: blur(10px);
}
.ts-intents { border: 0; padding: 0; margin: 0; min-width: 0; max-width: 100%; }
.ts-intents legend, .ts-month > span { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: rgb(241 211 154 / 92%); margin-bottom: 7px; padding: 0; }
.ts-intents legend em { font-style: normal; text-transform: none; letter-spacing: 0; color: rgb(255 244 226 / 60%); margin-left: 4px; }
.ts-chip-row { display: flex; gap: 5px; flex-wrap: wrap; }
.ts-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 6px;
  border-radius: 999px; border: 1px solid rgb(241 211 154 / 30%); background: rgb(255 248 236 / 6%);
  font-size: 12.5px; white-space: nowrap; transition: background .25s, border-color .25s;
}
.ts-chip b { font-family: var(--ts-brush); font-weight: 400; font-size: 15px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgb(163 42 36 / 80%); color: #ffe9c4; line-height: 1; }
.ts-chip:hover { border-color: var(--ts-gold); }
.ts-chip[aria-pressed="true"] { background: rgb(212 166 90 / 22%); border-color: var(--ts-gold-hi); color: #fff3dc; }
.ts-month { display: grid; }
.ts-month select {
  appearance: none; font: inherit; font-size: 13.5px; color: #fff3dc; cursor: pointer;
  padding: 7px 34px 7px 12px; border-radius: 999px; border: 1px solid rgb(241 211 154 / 30%);
  background: rgb(255 248 236 / 6%) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1d39a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center / 14px;
}
.ts-month select option { color: #222; }

/* ---------- Round buttons ---------- */
.ts-round {
  position: absolute; right: clamp(14px, 3vw, 36px); bottom: max(18px, env(safe-area-inset-bottom));
  width: 76px; height: 76px; border-radius: 50%; z-index: 6; padding: 0;
  display: grid; place-content: center; gap: 3px; text-align: center;
  background: radial-gradient(circle at 35% 30%, #d1493a, var(--ts-red) 60%, #6e1913);
  border: 2px solid rgb(241 211 154 / 70%);
  box-shadow: 0 10px 30px rgb(0 0 0 / 45%), 0 0 0 6px rgb(163 42 36 / 22%);
  transition: transform .3s var(--ts-ease);
}
.ts-round:hover { transform: translateY(-3px) scale(1.03); }
.ts-round-zh { font-family: var(--ts-brush); font-size: 20px; color: #ffe9c4; line-height: 1; }
.ts-round-en { font-size: 10.5px; letter-spacing: .06em; color: #fff1dc; }

/* ---------- Fog intro & leaves ---------- */
.ts-fog { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.ts-fog i { position: absolute; inset: -20%; background: radial-gradient(ellipse at center, rgb(255 252 246 / 96%) 0%, rgb(250 244 232 / 92%) 45%, rgb(240 230 214 / 85%) 100%); animation: ts-fog 2.6s var(--ts-ease) forwards; }
.ts-fog i:nth-child(2) { background: radial-gradient(ellipse 60% 40% at 30% 60%, rgb(255 255 255 / 90%), transparent 70%); animation-duration: 3.2s; }
.ts-fog i:nth-child(3) { background: radial-gradient(ellipse 60% 40% at 70% 40%, rgb(255 255 255 / 85%), transparent 70%); animation-duration: 3.6s; }
@keyframes ts-fog { 0%, 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); visibility: hidden; } }

.ts-leaves { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.ts-leaf {
  position: absolute; top: -40px; width: 16px; height: 16px;
  background: radial-gradient(circle at 50% 100%, transparent 18%, #e7b44c 20%, #d39a2f 62%, transparent 64%);
  border-radius: 0 50% 50% 50%; opacity: .85;
  animation: ts-fall linear infinite;
}
@keyframes ts-fall {
  0% { transform: translate3d(0, -5vh, 0) rotate(0); }
  50% { transform: translate3d(var(--drift, 40px), 50vh, 0) rotate(220deg); }
  100% { transform: translate3d(calc(var(--drift, 40px) * -0.4), 110vh, 0) rotate(420deg); }
}

/* ---------- Flash ---------- */
.ts-flash {
  position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 42%, #fffaf0 0%, #ffe2a2 18%, rgb(240 176 70 / 75%) 38%, rgb(160 90 20 / 0%) 72%);
}
.ts-flash.is-on { animation: ts-flash 1.25s ease-out forwards; }
@keyframes ts-flash { 0% { opacity: 0; transform: scale(.4); } 22% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.5); } }

/* ---------- Overlays & paper ---------- */
.ts-overlay { position: fixed; inset: 0; z-index: 15; display: grid; place-items: start center; overflow: hidden; }
.ts-reader-layer, .ts-share-layer { place-items: center; background: rgb(14 8 4 / 55%); backdrop-filter: blur(6px); }
.ts-reader-layer .ts-paper-shadow { width: auto; }
.ts-sign-hang { position: relative; display: grid; justify-items: center; width: min(560px, calc(100vw - 24px)); height: 100%; }
.ts-string { width: 2px; height: clamp(18px, 6vh, 64px); background: linear-gradient(#a32a24, #c8503e); box-shadow: 0 0 6px rgb(0 0 0 / 40%); flex: none; }
.ts-sign-layer.is-in .ts-sign-hang { animation: ts-drop 1.25s cubic-bezier(.2, .9, .25, 1) both; transform-origin: 50% 0; }
.ts-sign-layer.is-out .ts-sign-hang { animation: ts-lift .6s ease-in forwards; }
@keyframes ts-drop {
  0% { transform: translateY(-110%) rotate(-2deg); }
  55% { transform: translateY(2%) rotate(1.6deg); }
  72% { transform: translateY(-1%) rotate(-1deg); }
  86% { transform: translateY(.4%) rotate(.45deg); }
  100% { transform: translateY(0) rotate(0); }
}
@keyframes ts-lift { to { transform: translateY(-115%); opacity: .4; } }

.ts-paper-shadow { filter: drop-shadow(0 24px 40px rgb(0 0 0 / 55%)) drop-shadow(0 2px 3px rgb(0 0 0 / 30%)); width: 100%; min-height: 0; }
.ts-sign-hang .ts-paper-shadow { max-height: calc(100% - clamp(18px, 6vh, 64px) - 14px); display: flex; }
.ts-paper {
  position: relative; color: var(--ts-ink);
  background: url("/images/travel-sign/paper.webp") center / 420px repeat, var(--ts-paper);
  clip-path: var(--ts-torn, none);
  outline: none;
}
.ts-paper::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgb(120 80 40 / 16%) 100%);
}
.ts-sign {
  width: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  padding: 30px clamp(20px, 5vw, 40px) 26px;
}
.ts-sign-head { display: grid; justify-items: center; gap: 6px; text-align: center; }
.ts-seal {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--ts-red); color: var(--ts-red); background: rgb(163 42 36 / 6%);
  font-family: var(--ts-brush); font-size: 24px; line-height: 1;
  box-shadow: inset 0 0 0 3px rgb(243 237 226), inset 0 0 0 4px rgb(163 42 36 / 45%);
}
.ts-level { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ts-red); }
.ts-level b { font-family: var(--ts-brush); font-weight: 400; font-size: 15px; letter-spacing: .1em; margin-right: 6px; }
.ts-sign-zh { font-family: var(--ts-brush); font-weight: 400; font-size: clamp(30px, 6vw, 42px); line-height: 1.15; margin: 4px 0 0; letter-spacing: .08em; color: #1f140d; }
.ts-sign-en { font-family: var(--ts-serif); font-style: italic; font-size: 17px; line-height: 1.4; margin: 0; color: var(--ts-ink-soft); }
.ts-route-line { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #7a5a3c; margin: 6px 0 0; }
.ts-route-line strong { color: var(--ts-ink); letter-spacing: .08em; }
.ts-rule { border: 0; height: 1px; margin: 18px 0; background: linear-gradient(90deg, transparent, rgb(107 62 31 / 45%), transparent); }
.ts-reading { font-size: 14.5px; line-height: 1.7; margin: 0 0 16px; color: #3b2c21; text-align: center; }

.ts-cities { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: ts-city; }
.ts-city {
  counter-increment: ts-city;
  display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: center;
  padding: 8px; border-radius: 12px; background: rgb(255 252 245 / 62%); border: 1px solid var(--ts-line);
  text-decoration: none; transition: border-color .25s, transform .25s var(--ts-ease), background .25s;
}
.ts-city:hover { border-color: rgb(163 42 36 / 55%); transform: translateX(2px); background: rgb(255 252 245 / 92%); }
.ts-city-photo { position: relative; width: 74px; height: 62px; border-radius: 8px; overflow: hidden; }
.ts-city-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ts-city-photo::after { content: counter(ts-city); position: absolute; left: 4px; top: 4px; width: 19px; height: 19px; border-radius: 50%; background: var(--ts-red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.ts-city-name { font-family: var(--ts-serif); font-size: 17px; line-height: 1.15; margin: 0; }
.ts-city-name small { font-family: var(--ts-brush); font-size: 14px; color: #8a6747; margin-left: 6px; }
.ts-city-line { font-size: 12.5px; line-height: 1.45; color: var(--ts-ink-soft); margin: 2px 0 0; }
.ts-city-meta { font-size: 11px; color: #876a4f; margin: 3px 0 0; letter-spacing: .02em; }
.ts-city-meta .is-off { color: var(--ts-red); }
.ts-city-go { font-size: 12px; color: var(--ts-red); white-space: nowrap; padding-right: 4px; }

.ts-advice { margin-top: 14px; border: 1px solid var(--ts-line); border-radius: 12px; background: rgb(255 252 245 / 45%); }
.ts-advice summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #6b4a2f; }
.ts-advice summary::-webkit-details-marker { display: none; }
.ts-advice summary b { font-family: var(--ts-brush); font-weight: 400; font-size: 16px; letter-spacing: .08em; margin-right: 8px; color: var(--ts-red); text-transform: none; }
.ts-advice summary::after { content: ""; width: 9px; height: 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .3s; }
.ts-advice[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.ts-advice-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ts-ease); }
.ts-advice[open] .ts-advice-body { grid-template-rows: 1fr; }
.ts-advice-body > div { overflow: hidden; }
.ts-advice-body p { margin: 0; padding: 0 14px 13px; font-size: 13.5px; line-height: 1.65; color: #3b2c21; }

.ts-specialist { margin: 16px 0 0; padding: 14px 16px; border-radius: 12px; background: linear-gradient(135deg, rgb(163 42 36 / 9%), rgb(212 166 90 / 14%)); border: 1px solid rgb(163 42 36 / 22%); }
.ts-specialist h3 { margin: 0 0 4px; font-family: var(--ts-serif); font-weight: 500; font-size: 16px; }
.ts-specialist p { margin: 0 0 12px; font-size: 13px; line-height: 1.55; color: var(--ts-ink-soft); }
.ts-wish-label { display: block; font-size: 12.5px; color: #6b4a2f; margin: 0 0 6px; }
.ts-wish-label b { font-family: var(--ts-brush); font-weight: 400; color: var(--ts-red); font-size: 15px; margin-right: 6px; }
.ts-wish-input {
  width: 100%; font: inherit; font-size: 14px; color: var(--ts-ink); padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgb(107 62 31 / 30%); background: rgb(255 253 248 / 90%); transition: border-color .25s, box-shadow .25s;
}
.ts-wish-input:focus { outline: none; border-color: var(--ts-red); box-shadow: 0 0 0 3px rgb(163 42 36 / 14%); }
.ts-wish-count { display: block; text-align: right; font-size: 11px; color: #9a7d62; margin-top: 3px; }

.ts-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.ts-actions .ts-btn-primary { grid-column: 1 / -1; }
.ts-minor { display: flex; justify-content: center; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.ts-link { background: none; border: 0; padding: 4px 0; font-size: 13px; color: #6b4a2f !important; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(107 62 31 / 35%); }
.ts-link:hover { color: var(--ts-red) !important; }

.ts-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px;
  padding: 11px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 600; text-decoration: none; text-align: center;
  transition: background .25s, color .25s, transform .25s var(--ts-ease), border-color .25s; border: 1px solid transparent;
}
.ts-btn-primary { background: var(--ts-red) !important; color: #fff8ee !important; box-shadow: 0 8px 20px rgb(163 42 36 / 30%); }
.ts-btn-primary:hover { background: #8a2019 !important; transform: translateY(-1px); }
.ts-btn-ghost { background: transparent !important; color: var(--ts-ink) !important; border-color: rgb(107 62 31 / 40%) !important; }
.ts-btn-ghost:hover { border-color: var(--ts-red) !important; color: var(--ts-red) !important; }
.ts-btn.is-busy { background: #d78e83 !important; pointer-events: none; }
.ts-btn-hang { background: #6b3e1f !important; color: #fff8ee !important; }
.ts-btn-hang:hover { background: #55301a !important; }
.ts-disclaimer { margin: 14px 0 0; text-align: center; font-size: 11px; color: #9a7d62; }

/* ---------- Hanging tag ---------- */
.ts-hang-layer { place-items: start center; }
.ts-hang { display: grid; justify-items: center; gap: 10px; padding-top: 0; }
.ts-hang-tag { width: min(240px, 46vw); height: auto; transform-origin: 50% 0; filter: drop-shadow(0 18px 30px rgb(0 0 0 / 55%)); }
.ts-hang-layer.is-in .ts-hang-tag { animation: ts-tag-drop 2.1s cubic-bezier(.25, .9, .3, 1) both; }
@keyframes ts-tag-drop {
  0% { transform: translateY(-105%) rotate(0); }
  35% { transform: translateY(0) rotate(7deg); }
  52% { transform: translateY(0) rotate(-5deg); }
  68% { transform: translateY(0) rotate(3deg); }
  82% { transform: translateY(0) rotate(-1.4deg); }
  100% { transform: translateY(0) rotate(0); }
}
.ts-hang .ts-zh { font-size: 24px; color: var(--ts-gold-hi); text-shadow: 0 0 14px rgb(241 211 154 / 50%); opacity: 0; animation: ts-fade-up .8s .9s var(--ts-ease) forwards; }
.ts-hang-caption { margin: 0; font-family: var(--ts-serif); font-style: italic; font-size: 17px; color: #fff3dc; text-shadow: 0 1px 8px #000; opacity: 0; animation: ts-fade-up .8s 1.1s var(--ts-ease) forwards; }
@keyframes ts-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Wish tree ---------- */
.ts-heading-tree { margin-bottom: 0; }
.ts-tags { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.ts-tag {
  position: absolute; pointer-events: auto; padding: 0; border: 0; background: none;
  transform-origin: 50% 0; animation: ts-sway var(--sway, 4s) ease-in-out var(--delay, 0s) infinite alternate;
  opacity: 0; transition: opacity .7s var(--ts-ease);
}
.ts-tags.is-shown .ts-tag { opacity: 1; transition-delay: var(--appear, 0s); }
.ts-tag::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1.5px; height: var(--cord, 22px); background: #b4322a; translate: -50% 0; }
.ts-tag-paper {
  display: grid; place-items: center; padding: 8px 5px 10px; min-height: 66px; width: 28px;
  background: url("/images/travel-sign/paper.webp") center / 200px, #f1e8d6;
  box-shadow: 0 6px 14px rgb(40 20 6 / 45%);
  clip-path: polygon(0 2%, 100% 0, 98% 100%, 50% 96%, 2% 100%);
  font-family: var(--ts-brush); font-size: 15px; line-height: 1.08; color: #3a2416; writing-mode: vertical-rl; letter-spacing: .06em;
}
.ts-tag.is-glow .ts-tag-paper { box-shadow: 0 0 14px 3px rgb(255 236 190 / 75%), 0 6px 14px rgb(40 20 6 / 45%); background-color: #fff6e3; }
.ts-tag.is-mine .ts-tag-paper { width: 34px; min-height: 84px; font-size: 17px; color: var(--ts-red); box-shadow: 0 0 22px 7px rgb(255 226 150 / 85%), 0 8px 18px rgb(40 20 6 / 45%); background-color: #fff8e8; }
.ts-tag.is-mine::after { content: "Yours"; position: absolute; top: calc(100% + 6px); left: 50%; translate: -50% 0; font-size: 10px; letter-spacing: .1em; padding: 2px 7px; border-radius: 999px; background: var(--ts-red); color: #fff; white-space: nowrap; }
.ts-tag:hover .ts-tag-paper, .ts-tag:focus-visible .ts-tag-paper { transform: scale(1.12); }
.ts-tag-paper { transition: transform .3s var(--ts-ease); }
.ts-tag.is-new { animation: ts-sway var(--sway, 4s) ease-in-out var(--delay, 0s) infinite alternate, ts-pulse 1.6s ease-in-out 3; }
@keyframes ts-sway { from { transform: rotate(calc(var(--amp, 3deg) * -1)); } to { transform: rotate(var(--amp, 3deg)); } }
@keyframes ts-pulse { 50% { filter: brightness(1.25) drop-shadow(0 0 12px #ffe3a0); } }

.ts-tree-cta {
  position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); translate: -50% 0; z-index: 4;
  width: min(720px, calc(100% - 230px)); display: flex; align-items: center; gap: 16px; justify-content: space-between;
  padding: 12px 12px 12px 20px; border-radius: 18px;
  background: rgb(24 14 8 / 70%); border: 1px solid rgb(241 211 154 / 26%); backdrop-filter: blur(10px);
}
.ts-tree-cta p { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgb(255 244 226 / 88%); }
.ts-tree-cta strong { color: #fff3dc; font-weight: 600; display: block; font-family: var(--ts-serif); font-size: 16px; }
.ts-tree-cta .ts-btn { flex: none; }

/* ---------- Reader ---------- */
.ts-reader {
  width: min(330px, calc(100vw - 40px)); max-height: calc(100svh - 48px); overflow-y: auto;
  padding: 34px 26px 26px; display: grid; justify-items: center; gap: 14px; text-align: center;
}
.ts-reader-zh { font-family: var(--ts-brush); font-weight: 400; writing-mode: vertical-rl; font-size: 40px; letter-spacing: .2em; line-height: 1.1; margin: 0; color: #1f140d; min-height: 4.6em; }
.ts-reader-en { font-family: var(--ts-serif); font-style: italic; font-size: 18px; line-height: 1.45; margin: 0; }
.ts-reader-by { font-size: 12px; letter-spacing: .08em; color: #8a6747; margin: 0; }
.ts-reader-route { font-size: 13px; color: var(--ts-ink-soft); margin: 0; line-height: 1.6; }
.ts-reader-stamp { width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px solid var(--ts-red); color: var(--ts-red); font-family: var(--ts-brush); font-size: 16px; line-height: 1; transform: rotate(-6deg); }
.ts-reader .ts-btn { width: 100%; }

/* ---------- Share ---------- */
.ts-share { display: grid; gap: 14px; justify-items: center; padding: 16px; max-height: 100svh; outline: none; }
.ts-share img { max-height: calc(100svh - 120px); max-width: calc(100vw - 32px); border-radius: 10px; box-shadow: 0 20px 50px rgb(0 0 0 / 60%); }
.ts-share-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ts-share .ts-btn-ghost { color: #fff3dc !important; border-color: rgb(241 211 154 / 45%) !important; }

.ts-toast {
  position: fixed; left: 50%; bottom: 34%; translate: -50% 0; z-index: 30; margin: 0; max-width: calc(100% - 32px); text-align: center;
  padding: 10px 18px; border-radius: 999px; font-size: 13.5px; color: #2b1f17; background: #f8eedb; box-shadow: 0 10px 30px rgb(0 0 0 / 40%);
  animation: ts-fade-up .4s var(--ts-ease);
}
.ts-noscript { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; background: var(--ts-night); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .ts-top-link { display: none; }
  .ts-brand span { font-size: 15px; }
  .ts-sub br { display: none; }
  .ts-cylinder { height: clamp(180px, 28vh, 280px); }
  .ts-side { width: 44px; padding: 13px 8px; }
  .ts-side-left { margin-right: 10px; }
  .ts-side-right { margin-left: 10px; }
  .ts-ask { padding: 10px 10px 11px; gap: 10px; margin-bottom: 76px; width: 100%; max-width: 100%; }
  .ts-chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; padding: 0 10px; }
  .ts-chip-row::-webkit-scrollbar { display: none; }
  .ts-intents { width: 100%; }
  .ts-month { width: 100%; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
  .ts-month > span { margin: 0; }
  .ts-round { width: 64px; height: 64px; }
  .ts-round-zh { font-size: 17px; }
  .ts-round-en { font-size: 9.5px; }
  .ts-round-tree { bottom: max(14px, env(safe-area-inset-bottom)); }
  .ts-tree-cta { width: calc(100% - 28px); left: 14px; translate: none; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 74px); flex-direction: column; align-items: stretch; padding: 12px 14px; gap: 10px; }
  .ts-tree-cta .ts-btn { width: 100%; }
  .ts-city { grid-template-columns: 62px 1fr; }
  .ts-city-photo { width: 62px; height: 56px; }
  .ts-city-go { display: none; }
  .ts-sign { padding: 24px 18px 22px; }
  .ts-actions { grid-template-columns: 1fr; }
}
@media (max-height: 640px) and (min-width: 761px) {
  .ts-cylinder { height: 36vh; }
  .ts-heading .ts-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ts-cylinder, .ts-tag, .ts-leaf { animation: none !important; }
  .ts-fog { display: none; }
  .ts-leaves { display: none; }
  .ts-sign-layer.is-in .ts-sign-hang, .ts-hang-layer.is-in .ts-hang-tag { animation-duration: .01s !important; }
  .ts-cylinder.is-shaking { animation: ts-shake .5s both !important; }
}
.ts-body .travel-contact-close { font: 26px/1 sans-serif; color: var(--ink, #2b2b2b); }
.ts-body .travel-contact-dialog { color: var(--ink, #2b2b2b); font-family: var(--ts-sans); }
