/* 台鐵驛站: the preview phones' screens and the souvenir ticket page. Shared tokens come from style.css. */
.tk-title { display: flex; align-items: flex-end; gap: 8px; padding: 18px 14px 8px; }
.tk-title b { font-size: 19px; font-weight: 900; letter-spacing: .5px; }
.tk-track { position: relative; flex: 1; height: 16px; margin-bottom: 4px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); }
.tk-track::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; border-top: 1px solid var(--s-line); border-bottom: 1px solid var(--s-line);
  background: repeating-linear-gradient(90deg, var(--s-line) 0 2px, transparent 2px 6px); }
.tk-train { position: absolute; bottom: 2px; left: 0; display: flex; gap: 1px; animation: tk-pass 6s linear infinite; }
.tk-train i { position: relative; width: 26px; height: 11px; border-radius: 3px 7px 2px 2px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.tk-train i:first-child { border-radius: 7px 3px 2px 2px; }
.tk-train i::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1.5px; background: var(--s-fill); }
@keyframes tk-pass { 0% { transform: translateX(-60px); } 75% { transform: translateX(150px); } 100% { transform: translateX(150px); } }
@media (prefers-reduced-motion: reduce) { .tk-train { animation: none; transform: translateX(40px); } }
.tk-card { margin: 4px 12px 10px; padding: 12px; border-radius: 18px; background: var(--s-surface);
  box-shadow: inset 1px 1px .5px var(--s-rim), inset -1px -1.5px 2px var(--s-edge), 0 6px 14px var(--s-drop); }
.tk-od { display: flex; justify-content: space-between; align-items: flex-end; }
.tk-od small { display: block; color: var(--s-soft); font-size: 8.5px; }
.tk-od b { font-size: 18px; font-weight: 900; }
.tk-od .r { text-align: right; }
.tk-swap { width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; color: var(--s-tint); background: var(--s-surface);
  box-shadow: inset 1px 1px .5px var(--s-rim), 0 3px 8px var(--s-drop); font-size: 11px; margin-bottom: 4px; }
.tk-when { margin-top: 10px; padding: 7px 10px; border-radius: 12px; display: flex; justify-content: space-between; font-weight: 700; font-size: 10px;
  background: var(--s-canvas); box-shadow: inset 1px 2px 4px var(--s-edge); }
.tk-when span:last-child { color: var(--s-tint); }
.tk-go { margin: 0 12px 12px; height: 32px; border-radius: 16px; display: grid; place-items: center; background: var(--s-fill); color: #fff; font-weight: 700; font-size: 11px; }
.tk-h { padding: 4px 16px 6px; font-weight: 700; font-size: 12px; }
.tk-route { margin: 0 12px 8px; padding: 9px 12px; border-radius: 16px; background: var(--s-surface); display: flex; justify-content: space-between; align-items: center;
  box-shadow: inset 1px 1px .5px var(--s-rim), 0 4px 10px var(--s-drop); }
.tk-route b { display: block; font-size: 11.5px; }
.tk-route small { color: var(--s-soft); font-size: 9px; }
.tk-seg { margin: 4px 12px 8px; display: flex; padding: 3px; border-radius: 12px; background: var(--s-canvas); box-shadow: inset 1px 2px 4px var(--s-edge); font-size: 9.5px; font-weight: 700; }
.tk-seg span { flex: 1; text-align: center; padding: 4px 0; border-radius: 9px; }
.tk-seg .on { background: var(--s-surface); box-shadow: 0 1px 3px var(--s-drop); }
.tk-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 6px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--s-line); }
.tk-row time { font-weight: 900; font-size: 13px; }
.tk-row b { display: block; font-size: 11px; }
.tk-row small { font-size: 8.5px; font-weight: 700; }
.tk-row .red { color: #C42E3B; } .tk-row .blue { color: #2E5C8C; }
.tk-row em { font-style: normal; font-size: 9px; color: var(--s-soft); }

/* Souvenir ticket page (t.html) */
.souvenir { display: grid; justify-items: center; gap: 22px; padding: 40px 0 60px; }
.ticket { width: min(340px, 88vw); aspect-ratio: 215 / 300; box-sizing: border-box; padding: 22px 22px 18px; border-radius: 10px; color: #2A2C30;
  background-color: #FBF3E6; background-image: radial-gradient(circle at 10px 10px, transparent 7px, rgba(201, 160, 110, .22) 7.5px, transparent 8.5px); background-size: 20px 20px;
  box-shadow: 0 2px 4px rgba(120,105,85,.14), 0 18px 36px rgba(120,105,85,.2); display: flex; flex-direction: column; font-feature-settings: "tnum"; }
.ticket .brand-line { text-align: center; font-size: 12px; letter-spacing: 2px; }
.ticket .head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; font-size: 20px; }
.ticket .kind { text-align: right; font-size: 14px; }
.ticket .main { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; margin-top: 18px; }
.ticket .st { font-size: 38px; font-weight: 700; text-align: center; line-height: 1.1; }
.ticket .arrow { text-align: center; font-size: 13px; }
.ticket .t { font-size: 24px; text-align: right; }
.ticket .t small { font-size: 11px; }
.ticket .memo { margin-top: auto; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket .foot { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(42,44,48,.5); display: flex; justify-content: space-between; font-size: 11px; }
.souvenir .missing { text-align: center; color: var(--ink-soft); }
/* The ticket arrives like it just came out of the machine, gets punched, and a train runs past above it. */
.sv-scene { width: min(520px, 92vw); display: grid; justify-items: center; gap: 10px; }
.sv-sign { min-width: 150px; padding: 8px 22px 7px; border-radius: 6px; background: #fff; color: #1F2A3A; text-align: center; border-top: 5px solid var(--tint);
  box-shadow: 0 2px 3px rgba(0,0,0,.12), 0 8px 18px var(--drop-near); animation: tk-swing 4s ease-in-out infinite; transform-origin: 50% -20px; }
.sv-sign b { font-size: 26px; font-weight: 900; letter-spacing: 5px; }
@keyframes tk-swing { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
.sv-track { width: 100%; margin-top: 0; }
.souvenir .ticket { position: relative; animation: tk-print 1.1s cubic-bezier(.2,.8,.25,1) both; }
@keyframes tk-print { from { opacity: 0; transform: translateY(-40px) rotate(-6deg) scale(.92); } 70% { transform: translateY(4px) rotate(1.5deg); } to { opacity: 1; transform: rotate(-1.5deg); } }
.souvenir .ticket:hover { transform: rotate(0) translateY(-4px); transition: transform .3s; }
.ticket .punch { position: absolute; right: 34px; top: -1px; width: 16px; height: 12px; border-radius: 0 0 8px 8px; background: var(--canvas);
  box-shadow: inset 0 -2px 3px rgba(0,0,0,.18); transform: scale(0); animation: tk-punch .35s 1.3s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes tk-punch { to { transform: scale(1); } }
.sv-cta { max-width: 34ch; text-align: center; color: var(--ink-soft); line-height: 1.7; margin: 0; }
@media (prefers-reduced-motion: reduce) { .sv-sign, .souvenir .ticket, .ticket .punch { animation: none; } .ticket .punch { transform: none; } }

/* Feature bento: each card shows the real app screen for that feature. */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.bento .feature { display: flex; flex-direction: column; overflow: hidden; }
.f-trip { grid-column: span 4; flex-direction: row !important; gap: 28px; align-items: center; }
.f-near, .f-ticket, .f-album, .f-alert { grid-column: span 2; }
.f-offline { grid-column: span 6; flex-direction: row !important; gap: 28px; align-items: center; }
.f-trip .txt, .f-offline .txt { flex: 1; min-width: 0; }
.shot { margin: 0 0 20px; border-radius: 22px; overflow: hidden; background: #F6F1EA; box-shadow: inset 0 0 0 1px var(--line), 0 10px 24px var(--drop-near); }
.shot img { display: block; width: 100%; height: auto; }
.f-trip .shot, .f-offline .shot { flex: 1.15; margin: 0; }
.f-near .shot, .f-ticket .shot, .f-album .shot { height: 230px; }
.f-near .shot img, .f-ticket .shot img, .f-alert .shot img { height: 100%; object-fit: contain; object-position: top center; }
.f-album .shot { display: grid; place-items: start center; background: #F6F1EA; }
.f-album .shot img { width: 78%; margin-top: 14px; border-radius: 6px; }
.f-alert .shot { height: 230px; }
@media (max-width: 900px) {
  .f-trip, .f-offline { grid-column: span 6; }
  .f-near, .f-ticket, .f-album, .f-alert { grid-column: span 3; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .bento .feature { grid-column: auto !important; }
  .f-trip, .f-offline { flex-direction: column !important; align-items: stretch; }
}

/* The train that runs past on the souvenir page. */
.pass-track { position: relative; height: 26px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.pass-track::before { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 5px; border-top: 1.5px solid var(--ink-faint); border-bottom: 1.5px solid var(--ink-faint);
  background: repeating-linear-gradient(90deg, var(--ink-faint) 0 2px, transparent 2px 8px); opacity: .6; }
.pass-train { position: absolute; bottom: 7px; left: 0; display: flex; gap: 2px; animation: tk-pass-wide 7s linear infinite; }
.pass-train i { position: relative; display: block; height: 14px; width: 30px; border-radius: 3px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.22); }
.pass-train i:first-child { border-radius: 3px 3px 3px 9px; } .pass-train i:last-child { border-radius: 3px 3px 9px 3px; }
.pass-train i::before { content: ""; position: absolute; left: 5px; right: 5px; top: 3px; height: 4px; background: repeating-linear-gradient(90deg, #2A3448 0 5px, transparent 5px 7px); }
.pass-train i::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 2px; background: var(--tint); }
@keyframes tk-pass-wide { from { transform: translateX(-200px); } to { transform: translateX(600px); } }
@media (prefers-reduced-motion: reduce) { .pass-train { animation: none; transform: translateX(40px); } }
