/* PTJ shared interface: capsule controls and homepage-light lift/glow feedback.
   Page-specific colors and artwork remain with their current owners. */
:root { --ptj-control-radius: 9999px; --ptj-interaction-light: #f7f1e4; }
/* Artwork, image hotspots and flip cards keep the geometry of their scenes. */
html body :is(
  button.phrase-play.lc-action,
  button:not(.tart-button,.flip-card,.place-choice,.clock-choice,.event-visual,.object-choice,.dialog-backdrop),
  input:not([type=checkbox],[type=radio],[type=range],[type=color],[type=file],[type=hidden],[type=image]),
  select:not([multiple]):not([size]),
  select[size="1"],
  a:is(.nav-button,.text-button,.exit-unit,.leave-link,.leave-topic,.primary-button,.provider-button,.enter-button,.reading-button,.reading-link,.travel-return-link,.map-link),
  [role=button]:not(.tart-button,.flip-card,.place-choice,.clock-choice,.event-visual,.object-choice,.dialog-backdrop),
  [data-slot=button],[data-slot=badge],[data-slot=input],[data-slot=select-trigger],
  .city-nav a,.account-links a,.mobile-choice-list a,.appearance-option,
  .tag,.badge,.chip,.pill,.event-kind,.event-fee,.status-pill
) {
  border-radius: var(--ptj-control-radius) !important;
}

/* A rounded end needs breathing room, including native date/select controls. */
html body .event-filters :is(select,input) {
  padding-inline: 18px;
}
@media (max-width: 700px) {
  html body .event-filters {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  html body .event-filters > label:first-child {
    grid-column: 1 / -1;
  }
  html body .event-filters > label {
    flex: 1 1 160px;
    min-width: 0;
  }
  html body .event-filters :is(select,input) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding-inline: 18px;
  }
}

/* Use the homepage's light glow without changing text colors; no underlines. */
html:root body :is(a:any-link,button,input,select,textarea,summary,[role=button],[role=link],u,ins) {
  text-decoration-line: none !important;
}
@media (hover: hover) {
  html:root body :is(a:any-link,button,input:not([type=hidden]),select,textarea,summary,[role=button],[role=link]):not(:where(:disabled,[aria-disabled=true],[hidden],[inert],[inert] *,.dialog-backdrop)):hover {
  text-shadow: 0 0 12px color-mix(in srgb, var(--ptj-interaction-light) 45%, transparent) !important;
  translate: 0 -2px;
  }
}
html:root body :is(a:any-link,button,input:not([type=hidden]),select,textarea,summary,[role=button],[role=link]):not(:where(:disabled,[aria-disabled=true],[hidden],[inert],[inert] *,.dialog-backdrop)):focus-visible {
  text-shadow: 0 0 12px color-mix(in srgb, var(--ptj-interaction-light) 45%, transparent) !important;
  translate: 0 -2px;
}
/* These positioned/rotating scenes already provide their own movement. */
html:root body :is(.object-choice,.place-choice,.clock-choice,.flip-card,.tart-button) {
  translate: none !important;
}
html:root body .object-choice:is(:hover,:focus-visible) .choice-label {
  text-shadow: 0 0 12px color-mix(in srgb, var(--ptj-interaction-light) 45%, transparent) !important;
}
/* Plain prose/source links remain inline and can wrap across lines. Their
   source contexts do not use absolute/fixed anchor positioning. */
html:root body :is(p,li,dd,figcaption,h1,h2,h3,h4,h5,h6,.image-credit,.events-empty,.j-sources,.source-links,.sources,.data-sources) > a:not([class]) {
  position: relative;
}
@media (hover: hover) {
  html:root body :is(p,li,dd,figcaption,h1,h2,h3,h4,h5,h6,.image-credit,.events-empty,.j-sources,.source-links,.sources,.data-sources) > a:not([class]):hover {
    top: -2px;
    translate: none;
  }
}
html:root body :is(p,li,dd,figcaption,h1,h2,h3,h4,h5,h6,.image-credit,.events-empty,.j-sources,.source-links,.sources,.data-sources) > a:not([class]):focus-visible {
  top: -2px;
  translate: none;
}
@media (prefers-reduced-motion: reduce) {
  html:root body :is(a:any-link,button,input:not([type=hidden]),select,textarea,summary,[role=button],[role=link]):not(:where(:disabled,[aria-disabled=true],[hidden],[inert],[inert] *,.dialog-backdrop)) {
    translate: none !important;
    transition: none !important;
  }
  html:root body :is(p,li,dd,figcaption,h1,h2,h3,h4,h5,h6,.image-credit,.events-empty,.j-sources,.source-links,.sources,.data-sources) > a:not([class]) {
    top: 0 !important;
  }
}
/* Selection is shown by the existing text color; controls use text labels. */
html body select:not([multiple]):not([size]),
html body select[size="1"] {
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
}
html body summary { list-style: none; }
html body summary::-webkit-details-marker { display: none; }

/* PTJ narrative text flow: reader paragraphs only. Brand quotations, membership
   cards, controls and standalone learning scenes keep their own layout.
   Use ordinary wrapping and language-aware hyphenation, without balancing lines
   or stretching gaps between words. */
html body :is(
  [data-ptj-reader-kind="travel"] :is(.prose,.editorial-story),
  [data-ptj-prose]
) p:not(:where(blockquote *,.sources *,.source-list *,.sources-footer *,.source-refs *,.photo-credits *,.image-credit *,[data-ptj-text-wrap="preserve"],[data-ptj-text-wrap="preserve"] *)) {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-break: strict;
  text-wrap: wrap;
  text-align: start;
  word-spacing: normal;
  letter-spacing: normal;
  hyphens: auto;
}
/* Language tags describe pronunciation; they never turn ordinary prose into
   indivisible boxes. Unclassed prose links keep their normal inline flow too. */
html body :is(
  [data-ptj-reader-kind="travel"] :is(.prose,.editorial-story),
  [data-ptj-prose]
) p:not(:where(blockquote *,.sources *,.source-list *,.sources-footer *,.source-refs *,.photo-credits *,.image-credit *,[data-ptj-text-wrap="preserve"],[data-ptj-text-wrap="preserve"] *)) :is(span[lang]:not([class]),a:not([class])) {
  display: inline;
  white-space: normal;
  word-break: normal;
  margin-inline: 0;
  padding-inline: 0;
  font-kerning: normal;
}
/* Use the existing font's proportional Latin punctuation, while retaining
   Han punctuation metrics and the original authored characters. */
html body :is(
  [data-ptj-reader-kind="travel"] :is(.prose,.editorial-story),
  [data-ptj-prose]
) p:not(:where(blockquote *,.sources *,.source-list *,.sources-footer *,.source-refs *,.photo-credits *,.image-credit *,[data-ptj-text-wrap="preserve"],[data-ptj-text-wrap="preserve"] *)) :is([lang|="en"],[lang|="pt"]) {
  font-variant-east-asian: proportional-width;
}

/* Shared brand footer: page-specific source and maintenance information stays above it. */
@font-face{font-family:PTJFooterHand;src:url('/travel/cities/assets/fonts/city-hand-tc.woff2') format('woff2');font-display:swap}
html body footer[data-ptj-brand-footer]{box-sizing:border-box;display:block;width:100%;max-width:none;margin:0;padding:64px 0 calc(96px + env(safe-area-inset-bottom,0px));border:0;background:#F3F3F3;color:var(--ptj-reading-ink,#282421);text-align:left}
html body [data-brand-footer-inner]{box-sizing:border-box;width:min(1200px,calc(100% - 56px));margin:auto;display:grid;grid-template-columns:2fr 1fr;gap:40px 80px;font:400 14px/1.9 sans-serif}
html body [data-brand-footer-logo]{font:400 32px/1.5 PTJFooterHand,serif;color:inherit}
html body [data-brand-footer-inner] p{margin:12px 0;font:inherit}
html body [data-ptj-brand-footer] nav{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:0;margin:0}
html body [data-ptj-brand-footer] a{color:inherit;white-space:normal}
html body [data-brand-footer-inner]>small{grid-column:1/-1;font-size:12px}
html[data-theme] body[data-ptj-theme-scope=site]:has(>[data-ptj-brand-footer]){padding-bottom:0}
@media(max-width:480px){html body [data-brand-footer-inner]{grid-template-columns:1fr;gap:28px}html body footer[data-ptj-brand-footer]{padding-top:48px}}

/* Keep the existing dark reading appearance; the light brand band matches the reference. */
html[data-theme=dark] body footer[data-ptj-brand-footer]{background:var(--ptj-reading-bg,#111111)}

/* Activity header follows the Blog's two unframed, document-top action icons. */
html body[data-ptj-simple-header] .ptj-header-actions{position:absolute;top:calc(24px + env(safe-area-inset-top,0px));right:calc(24px + env(safe-area-inset-right,0px));display:flex;gap:8px;padding:0;border:0;border-radius:0;background:transparent;color:var(--ptj-reading-ink);box-shadow:none;backdrop-filter:none}
html body[data-ptj-simple-header] .ptj-header-actions :is(.ptj-search-trigger,.ptj-blog-member){width:44px;height:44px;padding:0;border:0;border-radius:4px;background:transparent;box-shadow:none}
html body[data-ptj-simple-header] .j-masthead{padding-right:112px;justify-content:flex-start}
@media(max-width:640px){html body[data-ptj-simple-header] .ptj-header-actions{top:calc(16px + env(safe-area-inset-top,0px));right:calc(16px + env(safe-area-inset-right,0px))}html body[data-ptj-simple-header] .j-masthead{padding-right:100px;gap:12px}html body[data-ptj-simple-header] .j-section{font-size:12px}}

/* PTJ neutral control glass — 2026-11-03.
   Only the appearance trigger and the article search input; no layout/runtime changes.
   RGB comes from the current #FCFFFF paper canvas, not the historical warm paper. */
html:root body[data-ptj-theme-scope] :is(.appearance > button.appearance-trigger, dialog.ptj-article-search .ptj-search-form > input) {
  --ptj-control-glass-rgb: 252, 255, 255;
  --ptj-control-glass-alpha: .42;
  --ptj-control-glass-hover-alpha: .52;
  color: #060301;
  background-color: rgba(var(--ptj-control-glass-rgb), var(--ptj-control-glass-alpha));
  /* A fixed white reflection lifts dark scenery without changing the page scrim.
     Both gradient stops remain translucent and use the existing paper white. */
  background-image: linear-gradient(180deg, rgba(var(--ptj-control-glass-rgb), .60), rgba(var(--ptj-control-glass-rgb), .32));
  border: 1px solid rgba(156, 167, 165, .4);
  border-radius: 9999px;
  box-shadow: inset 0 1px 0 rgba(var(--ptj-control-glass-rgb), .8), 0 6px 20px rgba(6, 3, 1, .08);
  -webkit-backdrop-filter: blur(16px) saturate(110%) brightness(1.35);
  backdrop-filter: blur(16px) saturate(110%) brightness(1.35);
  opacity: 1;
  filter: none;
  translate: none;
  text-shadow: none !important;
  transition: background-color 180ms ease;
}
html:root body[data-ptj-theme-scope] .appearance > button.appearance-trigger .appearance-current {color:inherit}
/* Dark mode keeps the same white glass. The small alpha increase and existing
   near-black brand ink keep 12–16px labels readable on Midnight Black. */
html:root[data-theme=dark] body[data-ptj-theme-scope] :is(.appearance > button.appearance-trigger, dialog.ptj-article-search .ptj-search-form > input) {
  --ptj-control-glass-alpha: .52;
  --ptj-control-glass-hover-alpha: .62;
  color: #060301;
}
html:root[data-theme=dark] body[data-ptj-theme-scope] .appearance > button.appearance-trigger .appearance-current,
html:root[data-theme=dark] body[data-ptj-theme-scope] dialog.ptj-article-search .ptj-search-form > svg {color:#060301}
@media (hover: hover) {
  html:root body[data-ptj-theme-scope] :is(.appearance > button.appearance-trigger, dialog.ptj-article-search .ptj-search-form > input):hover {
    background-color: rgba(var(--ptj-control-glass-rgb), var(--ptj-control-glass-hover-alpha));
  }
}
html:root body[data-ptj-theme-scope] :is(.appearance > button.appearance-trigger, dialog.ptj-article-search .ptj-search-form > input):not(:focus-visible) {outline:none}
html:root body[data-ptj-theme-scope] :is(.appearance > button.appearance-trigger, dialog.ptj-article-search .ptj-search-form > input):focus-visible {
  outline: 2px solid var(--ptj-reading-ink, #282421);
  outline-offset: 3px;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html:root[data-theme] body[data-ptj-theme-scope] :is(.appearance > button.appearance-trigger, dialog.ptj-article-search .ptj-search-form > input) {
    --ptj-control-glass-alpha: .92;
    --ptj-control-glass-hover-alpha: .92;
    background-image: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html:root body[data-ptj-theme-scope] :is(.appearance > button.appearance-trigger, dialog.ptj-article-search .ptj-search-form > input) {transition:none}
}
