#city-tools { display: grid; gap: 12px; min-width: 0; }
.ct-tabs { display: flex; gap: 7px; min-width: 0; overflow: auto; padding: 3px; scrollbar-width: thin; }
.ct-tabs button, .ct-sheet button, .ct-ticket { font: inherit; cursor: pointer; }
.ct-tabs button { flex: none; border-radius: 999px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line,#40444d); color: var(--text,#f2f4f9); background: var(--paper,#1a202d); font-size: 13px; font-weight: 600; }
.ct-tabs .ct-all { color: var(--accent,#96afff); }
.ct-tab[aria-pressed="true"] { background: var(--highlight,#365edc); color: var(--highlight-ink,#11151b); border-color: transparent; }
.ct-ticket {
  position: relative; isolation: isolate; width: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 18px; padding: 17px 25px; text-align: left;
  border: 0; border-radius: 21px; overflow: hidden; color: var(--text,#fff);
  background: color-mix(in srgb,var(--highlight,#365edc) 12%,var(--paper,#1a202d));
}
.ct-ticket::before,.ct-ticket::after { content: ""; position: absolute; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--page,#0e121b); }
.ct-ticket::before { left: -9px; }
.ct-ticket::after { right: -9px; }
.ct-ticket-text { display: grid; gap: 5px; min-width: 0; }
.ct-ticket-text strong { font-size: clamp(20px,2.6vw,31px); letter-spacing: -.045em; overflow-wrap: anywhere; }
.ct-ticket-detail,.ct-ticket-action { font-size: 12px; font-weight: 600; }
.ct-ticket-action { color: var(--highlight-text); }
.ct-ticket-qr { flex: 0 0 74px; padding-left: 15px; border-left: 1px dashed currentColor; }
.ct-code { display: block; width: 100%; height: auto; border-radius: 4px; image-rendering: pixelated; }
.ct-ticket-qr .ct-code { border: 3px solid var(--highlight,#365edc); }
#qr-trigger svg { width: 22px; height: 22px; display: block; }
.ct-sheet { position: fixed; inset: auto 0 0; background: transparent; color: var(--text,#fff); width: min(100%,520px); max-width: none; max-height: 88vh; max-height: 88dvh; margin: 0 auto; padding: 0; border: 0; overflow: auto; border-radius: 25px 25px 0 0; }
.ct-sheet::backdrop { background: #05070bbf; }
.ct-sheet-inner { border-radius: inherit; background: var(--paper,#1a202d); border: 1px solid var(--line,#424751); border-bottom: 0; padding: 18px 20px max(22px,env(safe-area-inset-bottom),var(--tg-content-safe-area-inset-bottom,0px)); display: grid; gap: 14px; }
.ct-sheet-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ct-sheet-heading h2 { margin: 0; font-size: clamp(20px,3vw,26px); letter-spacing: -.035em; }
.ct-sheet .ct-close { flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--page,#0e121b); color: var(--text,#fff); font: 26px/1 sans-serif; }
.ct-search,.ct-share-url { min-width: 0; width: 100%; box-sizing: border-box; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line,#454851); color: var(--text,#fff); background: var(--page,#0e121b); font: inherit; }
.ct-city-list { display: grid; align-content: start; overflow-y: auto; max-height: min(55vh,420px); max-height: min(55dvh,420px); overscroll-behavior: contain; }
.ct-sheet .ct-city-row { min-height: 47px; text-align: left; display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 9px; border: 0; border-bottom: 1px solid var(--line,#464951); background: transparent; color: inherit; }
.ct-sheet .ct-city-row[aria-pressed="true"] { color: var(--highlight-text); }
.ct-city-row small { white-space: nowrap; color: var(--muted,#bbc0c9); }
.ct-empty { padding: 12px; }
.ct-large-code { width: min(66vw,230px); margin: 0 auto; padding: 7px; border-radius: 14px; background: white; }
.ct-share-url { font-size: 13px; }
.ct-sheet .ct-copy { min-height: 46px; border: none; border-radius: 13px; background: var(--highlight,#365edc); color: var(--highlight-ink,#11151b); font-weight: 600; }
.ct-copy-status { margin: 0; font-size: 13px; }
.ct-copy-status:empty { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .ct-sheet[open] { animation: ct-rise .22s cubic-bezier(.22,.88,.3,1) both; }
  .ct-sheet[open].ct-leaving { animation: ct-fall .15s ease-in both; }
  @keyframes ct-rise { from { transform: translateY(100%); opacity: .4; } }
  @keyframes ct-fall { to { transform: translateY(100%); opacity: .4; } }
}
.ct-pass {
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 2fr);
  gap: 8px;
}
.ct-city-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 0;
  border-radius: 17px;
  text-align: left;
  background: var(--control);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.ct-city-card strong { font-size: 14px; line-height: 1.15; overflow-wrap: anywhere; }
.ct-city-card small, .ct-site-ticket small { color: var(--muted); font-size: 12px; }
.ct-map-link { white-space: nowrap; margin-top: auto; padding: 4px clamp(3px,1vw,7px); border-radius: 7px; background: var(--highlight); color: var(--on-highlight,#13151a); font-size: 11px; font-weight: 650; }
.discovery-panel .ct-ticket.ct-site-ticket {
  gap: 6px; min-width: 0; padding: 12px clamp(10px,2vw,18px); min-height: 94px; text-decoration: none;
}
.ct-site-ticket .ct-ticket-text { align-self: stretch; align-content: space-between; gap: 12px; }
.ct-site-ticket .ct-ticket-text strong { font-size: clamp(16px,3vw,25px); line-height: 1.1; font-weight: 600; }
.discovery-panel .ct-site-ticket .ct-ticket-qr { flex: 0 0 clamp(60px,17vw,88px); padding: 0; border: 0; }
.ct-site-ticket .ct-code { border: 0; border-radius: 7px; }
@media(max-width:360px) {
  .ct-pass { grid-template-columns: minmax(0,.76fr) minmax(0,2fr); gap: 5px; }
  .ct-city-card { padding: 9px; }
}
