@import url("/static/default/css/poppins.css");

:root{
  --hsr-ink: #111827;
  --hsr-mute: rgba(17,24,39,.72);
  --hsr-line: rgba(17,24,39,.10);

  /* Reference: China Travel Planner (Tailwind config) */
  --hsr-primary: #6366f1;
  --hsr-secondary: #a78bfa;
  --hsr-accent: #f472b6;

  --hsr-card: rgba(255,255,255,.82);
  --hsr-card-strong: rgba(255,255,255,.92);
  --hsr-danger: #ef4444;
  --hsr-radius: 0px;
  --hsr-ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

.hsr-page{
  position: relative;
  padding: 0 0 60px;
  color: var(--hsr-ink);
  font-family: 'Poppins', sans-serif;
  background:
    radial-gradient(1000px 520px at 18% 8%, rgba(99,102,241,.20), transparent 62%),
    radial-gradient(900px 520px at 86% 14%, rgba(167,139,250,.18), transparent 58%),
    radial-gradient(900px 680px at 50% 110%, rgba(244,114,182,.16), transparent 62%),
    linear-gradient(135deg, #eef2ff 0%, #f5f3ff 45%, #fce7f3 100%);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 22px 55px rgba(17,24,39,.10);
}

.hsr-page::before{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;
  opacity:.45;
  background:
    repeating-linear-gradient(90deg, rgba(17,24,39,.06) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(0deg, rgba(17,24,39,.035) 0 1px, transparent 1px 14px);
  mask-image: radial-gradient(1100px 680px at 50% 0%, black 55%, transparent 78%);
}

.hsr-page::after{
  content:"";
  position:absolute;
  inset:-40px -80px;
  pointer-events:none;
  opacity:.16;
  background:
    radial-gradient(closest-side at 30% 30%, rgba(99,102,241,.65), transparent 70%),
    radial-gradient(closest-side at 70% 25%, rgba(167,139,250,.55), transparent 72%),
    radial-gradient(closest-side at 55% 75%, rgba(244,114,182,.55), transparent 72%);
  filter: blur(26px);
  transform: translate3d(0,0,0);
}

.hsr-wrap{
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hsr-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 2px 18px;
}

.hsr-kicker{
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(17,24,39,.62);
}

.hsr-title{
  margin: 0 0 10px;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, rgba(17,24,39,1) 12%, var(--hsr-primary) 54%, var(--hsr-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 18px 45px rgba(17,24,39,.14);
}

.hsr-subtitle{
  margin: 0;
  max-width: 70ch;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(17,24,39,.72);
}

.hsr-shell{
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 18px;
  align-items: start;
}

.hsr-left{
  display: grid;
  gap: 14px;
}

.hsr-mapCard{
  position: sticky;
  top: 18px;
}

.hsr-optMobile{
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.65);
  background: linear-gradient(180deg, var(--hsr-card-strong), var(--hsr-card));
  box-shadow: 0 16px 40px rgba(17,24,39,.10);
  backdrop-filter: blur(12px);
}

.hsr-cardPad{
  overflow: hidden;
}

.hsr-cardHeaderTight{
  padding: 16px 16px 10px;
}

.hsr-collapseBtn{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,.12);
  background: rgba(255,255,255,.72);
  color: rgba(17,24,39,.72);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: transform .12s var(--hsr-ease), background .15s var(--hsr-ease), border-color .15s var(--hsr-ease);
}

.hsr-collapseBtn:hover{
  transform: translateY(-1px);
  border-color: rgba(17,24,39,.18);
  background: rgba(255,255,255,.92);
}

.hsr-collapseIcon{
  transition: transform .18s var(--hsr-ease);
}

.hsr-collapseBtn[data-collapsed="true"] .hsr-collapseIcon{
  transform: rotate(180deg);
}

.hsr-citiesSummary{
  display: none;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(17,24,39,.08);
  color: rgba(17,24,39,.72);
  font-size: 13px;
  line-height: 1.45;
}

#hsrCitiesCard.hsr-collapsed .hsr-leftBody{
  display: none;
}

#hsrCitiesCard.hsr-collapsed .hsr-citiesSummary{
  display: block;
}

.hsr-leftBody{
  padding: 12px 16px 16px;
}

.hsr-controls{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.hsr-toggle{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(17,24,39,.75);
  user-select: none;
}

.hsr-toggle input{
  width: 40px;
  height: 22px;
  border-radius: 999px;
  appearance: none;
  background: rgba(17,24,39,.12);
  border: 1px solid rgba(17,24,39,.10);
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background .15s var(--hsr-ease), border-color .15s var(--hsr-ease);
}

.hsr-toggle input::after{
  content:"";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 18px rgba(17,24,39,.18);
  transition: transform .18s var(--hsr-ease);
}

.hsr-toggle input:checked{
  background: rgba(99,102,241,.55);
  border-color: rgba(99,102,241,.35);
}

.hsr-toggle input:checked::after{
  transform: translateX(18px);
}

.hsr-btnSm{
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.hsr-cityGrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hsr-cityBtn{
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(17,24,39,.12);
  background: rgba(255,255,255,.75);
  color: rgba(17,24,39,.82);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .12s var(--hsr-ease), border-color .15s var(--hsr-ease), box-shadow .15s var(--hsr-ease), background .15s var(--hsr-ease);
}

.hsr-cityBtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(17,24,39,.10);
  border-color: rgba(17,24,39,.18);
}

.hsr-cityBtn[data-selected="true"]{
  border-color: rgba(99,102,241,.35);
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(255,255,255,.62), transparent 55%),
    linear-gradient(90deg, rgba(99,102,241,.22), rgba(167,139,250,.18));
}

.hsr-cityBtn[data-active="true"]{
  box-shadow: 0 0 0 4px rgba(244,114,182,.14);
  border-color: rgba(244,114,182,.35);
}

.hsr-picked{
  margin-top: 12px;
  border-top: 1px solid rgba(17,24,39,.08);
  padding-top: 12px;
}

.hsr-pickedHead{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.hsr-pickedTitle{
  font-weight: 720;
}

.hsr-pickedHint{
  font-size: 12px;
  color: rgba(17,24,39,.58);
}

.hsr-pickedList{
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: rgba(17,24,39,.82);
  font-size: 13px;
}

.hsr-pickedRow{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(255,255,255,.72);
  padding: 10px 10px 10px 12px;
}

.hsr-pickedRow[draggable="true"]{
  cursor: grab;
}

.hsr-pickedRow:active{
  cursor: grabbing;
}

.hsr-pickedRow[data-pinned="true"]{
  cursor: default;
}

.hsr-pickedRow[data-pinned="true"]:active{
  cursor: default;
}

.hsr-pickedRow[data-drag-over="true"]{
  box-shadow: 0 0 0 4px rgba(99,102,241,.14);
  border-color: rgba(99,102,241,.32);
}

.hsr-pickedName{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  min-width: 0;
}

.hsr-dragHandle{
  width: 10px;
  height: 18px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 20%, rgba(17,24,39,.22) 2px, transparent 3px),
    radial-gradient(circle at 50% 50%, rgba(17,24,39,.22) 2px, transparent 3px),
    radial-gradient(circle at 50% 80%, rgba(17,24,39,.22) 2px, transparent 3px);
  opacity: .75;
  flex: 0 0 auto;
}

.hsr-pickedActions{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hsr-pickedRemove{
  border: none;
  background: transparent;
  color: rgba(17,24,39,.55);
  cursor: pointer;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 10px;
  transition: background .15s var(--hsr-ease), color .15s var(--hsr-ease);
}

.hsr-pickedRemove:hover{
  background: rgba(17,24,39,.06);
  color: rgba(17,24,39,.78);
}

.hsr-pinBtn{
  border: 1px solid rgba(17,24,39,.12);
  background: rgba(255,255,255,.78);
  color: rgba(17,24,39,.72);
  cursor: pointer;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background .15s var(--hsr-ease), border-color .15s var(--hsr-ease), transform .12s var(--hsr-ease);
}

.hsr-pinBtn:hover{
  transform: translateY(-1px);
  border-color: rgba(17,24,39,.18);
  background: rgba(255,255,255,.92);
}

.hsr-pinBtn[data-on="true"]{
  border-color: rgba(99,102,241,.35);
  background: rgba(99,102,241,.12);
  color: rgba(17,24,39,.86);
}

.hsr-routeBody{
  padding: 12px 16px 16px;
}

.hsr-export{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(17,24,39,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hsr-exportBtn{
  height: 34px;
  border-radius: 0;
  padding: 0 14px;
  border: 1px solid rgba(17,24,39,.14);
  background: rgba(255,255,255,.72);
  color: rgba(17,24,39,.92);
  cursor: pointer;
  transition: transform .12s var(--hsr-ease), background .15s var(--hsr-ease), border-color .15s var(--hsr-ease), box-shadow .15s var(--hsr-ease);
  flex: 0 0 auto;
}

.hsr-exportBtn:hover:not([disabled]){
  transform: translateY(-1px);
  border-color: rgba(17,24,39,.20);
  box-shadow: 0 10px 20px rgba(17,24,39,.10);
}

.hsr-exportBtn[disabled]{
  opacity: .55;
  cursor: not-allowed;
}

.hsr-exportHint{
  font-size: 12px;
  color: rgba(17,24,39,.58);
  line-height: 1.4;
  min-width: 0;
}

.hsr-summary{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.hsr-pill{
  border-radius: 0;
  padding: 8px 12px;
  border: 1px solid rgba(17,24,39,.12);
  background: rgba(255,255,255,.72);
  font-size: 12px;
  color: rgba(17,24,39,.70);
}

.hsr-segs{
  display: grid;
  gap: 10px;
}

.hsr-seg{
  border-radius: 0;
  border: 1px solid rgba(17,24,39,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.70));
  padding: 12px;
}

.hsr-segTop{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.hsr-segTitle{
  font-weight: 740;
}

.hsr-segMeta{
  font-size: 12px;
  color: rgba(17,24,39,.62);
}

.hsr-segNote{
  font-size: 12px;
  color: rgba(17,24,39,.72);
  line-height: 1.55;
}

.hsr-link{
  color: rgba(99,102,241,1);
  text-decoration: none;
  font-weight: 650;
}

.hsr-link:hover{
  text-decoration: underline;
}

.hsr-mapInner{
  overflow: hidden;
}

.hsr-mapStage{
  padding: 12px 16px 16px;
}

.hsr-map{
  width: 100%;
  height: auto;
  border-radius: 0;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(255,255,255,.55);
}

.hsr-map-city{
  cursor: pointer;
}

.hsr-map-city circle{
  transition: r .12s var(--hsr-ease), fill .15s var(--hsr-ease), stroke .15s var(--hsr-ease), opacity .15s var(--hsr-ease);
}

.hsr-map-city[data-selected="true"] circle{
  fill: rgba(99,102,241,.88);
  stroke: rgba(255,255,255,.92);
}

.hsr-map-city[data-active="true"] circle{
  fill: rgba(244,114,182,.95);
  filter: url(#hsrGlow);
}

.hsr-map-label{
  font-size: 12px;
  fill: rgba(17,24,39,.82);
  paint-order: stroke;
  stroke: rgba(255,255,255,.85);
  stroke-width: 4px;
}

.hsr-map-route{
  stroke: rgba(99,102,241,.70);
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hsr-map-routeAlt{
  stroke: rgba(244,114,182,.70);
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hsr-card{
  border-radius: var(--hsr-radius);
  border: 1px solid rgba(255,255,255,.65);
  background: linear-gradient(180deg, var(--hsr-card-strong), var(--hsr-card));
  box-shadow:
    0 22px 55px rgba(17,24,39,.14),
    0 8px 18px rgba(17,24,39,.08),
    inset 0 1px 0 rgba(255,255,255,.78);
  backdrop-filter: blur(12px);
}

.hsr-cardHeader{
  padding: 18px 18px 10px;
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(17,24,39,.08);
}

.hsr-routeHeaderRight{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hsr-currencySelect{
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,.12);
  background: rgba(255,255,255,.72);
  color: rgba(17,24,39,.78);
  padding: 0 10px;
  font-size: 12px;
  outline: none;
}

.hsr-currencySelect:focus{
  border-color: rgba(99,102,241,.35);
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}

.hsr-srOnly{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.hsr-cardTitle{
  font-weight: 720;
  letter-spacing: .01em;
}

.hsr-cardHint{
  font-size: 12px;
  color: rgba(17,24,39,.58);
}

.hsr-cardHintRow{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.hsr-cardHintText{
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.hsr-fields{
  padding: 16px 18px 6px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hsr-field{
  display:flex;
  flex-direction: column;
  gap: 7px;
}

.hsr-label{
  font-size: 12px;
  color: rgba(17,24,39,.70);
}

.hsr-input,
.hsr-select{
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(17,24,39,.16);
  background: rgba(255,255,255,.80);
  color: rgba(17,24,39,.92);
  padding: 0 12px;
  outline: none;
  transition: border-color .15s var(--hsr-ease), box-shadow .15s var(--hsr-ease), transform .12s var(--hsr-ease), background .15s var(--hsr-ease);
}

.hsr-input::placeholder{
  color: rgba(17,24,39,.45);
}

.hsr-input:focus,
.hsr-select:focus{
  border-color: rgba(99,102,241,.62);
  box-shadow: 0 0 0 4px rgba(99,102,241,.14);
  background: rgba(255,255,255,.96);
}

.hsr-actions{
  padding: 12px 18px 18px;
  display:flex;
  gap: 10px;
}

.hsr-btn{
  height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  border: 1px solid rgba(17,24,39,.14);
  background: rgba(255,255,255,.72);
  color: rgba(17,24,39,.92);
  cursor: pointer;
  transition: transform .12s var(--hsr-ease), background .15s var(--hsr-ease), border-color .15s var(--hsr-ease), box-shadow .15s var(--hsr-ease);
}

.hsr-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(17,24,39,.20);
  box-shadow: 0 10px 20px rgba(17,24,39,.10);
}

.hsr-btn:active{
  transform: translateY(0);
}

.hsr-btnPrimary{
  flex: 1;
  border-color: rgba(99,102,241,.24);
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(255,255,255,.55), transparent 55%),
    linear-gradient(90deg, rgba(99,102,241,1) 0%, rgba(167,139,250,1) 55%, rgba(244,114,182,1) 110%);
  color: white;
  box-shadow: 0 18px 55px rgba(99,102,241,.26);
}

.hsr-btnPrimary:hover{
  border-color: rgba(99,102,241,.34);
  box-shadow: 0 20px 70px rgba(99,102,241,.28);
}

.hsr-btnGhost{
  width: 120px;
}

.hsr-emptyTitle{
  font-weight: 740;
  margin-bottom: 6px;
}

.hsr-emptyText{
  color: rgba(17,24,39,.70);
  font-size: 13px;
}

@media (prefers-reduced-motion: no-preference){
  .hsr-head{ animation: hsr-fade-up .65s var(--hsr-ease) both; }
  .hsr-card{ animation: hsr-fade-up .75s var(--hsr-ease) both; }
  .hsr-card:nth-of-type(2){ animation-delay: .06s; }
}

@keyframes hsr-fade-up{
  from{ opacity: 0; transform: translateY(10px); }
  to{ opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px){
  .hsr-shell{ grid-template-columns: 1fr; }
  .hsr-mapCard{ position: relative; top: auto; }
  .hsr-cityGrid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hsr-cardHintText{ max-width: 260px; }
  .hsr-optDesktop{ display: none; }
  .hsr-optMobile{ display: flex; }
}

@media (max-width: 560px){
  .hsr-wrap{ width: min(1120px, calc(100% - 26px)); }
  .hsr-head{ flex-direction: column; align-items: flex-start; }
  .hsr-cityGrid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hsr-mapStage{ padding: 10px 12px 14px; }
  .hsr-leftBody{ padding: 10px 12px 14px; }
  .hsr-routeBody{ padding: 10px 12px 14px; }
}
