.brand strong,h1,h2,.p-categories strong,.btn,.filter,.p-start,.nav-link{font-family:'LXGW WenKai TC',sans-serif;font-weight:700;-webkit-text-stroke:.35px currentColor}
.p-categories a,.p-start,.btn,.filter,.menu-toggle,.nav-link,.p-search-form button,.rental-panel,.rental-group,.rental-copy{background-image:url('./crayon-fill.png')!important;background-size:180px 120px!important}
.info-card::before,.page-hero::before,.p-categories a::before,.btn::before,.filter::before,.p-start::before,.rental-group::before,.rental-panel::before{border:12px solid transparent;border-image:url('./frames/teal.png') 35 stretch;background:none!important}
.info-card:nth-child(3n+1)::before,.p-start::before{border-image-source:url('./frames/coral.png')}
.info-card:nth-child(3n+2)::before{border-image-source:url('./frames/blue.png')}
.info-card{position:relative}
@media(hover:none) and (pointer:coarse) and (prefers-reduced-motion:no-preference){
  #main :is(.info-card,.p-guide-row,.weather-card,.marine-box,.p-intro,.page-hero,.p-categories a,.p-trip-note,.rental-panel,.rental-copy)[style*="--card-lift:"]{
    z-index:2;
    translate:0 calc(-8px * var(--card-lift));
    filter:drop-shadow(0 9px 6px rgb(118 83 52 / calc(.31 * var(--card-lift))));
    transition:none;
  }
}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  #main :is(.info-card,.p-guide-row,.weather-card,.marine-box,.p-intro,.page-hero,.p-categories a,.p-trip-note,.rental-panel,.rental-copy),
  :is(.btn,.filter,.p-start,.nav-link){
    transition:transform .34s cubic-bezier(.22,1,.36,1),filter .34s cubic-bezier(.22,1,.36,1);
  }
  #main :is(.info-card,.p-guide-row,.weather-card,.marine-box,.p-intro,.page-hero,.p-categories a,.p-trip-note,.rental-panel,.rental-copy):hover{
    z-index:2;
    transform:translateY(-10px);
    filter:drop-shadow(0 9px 6px #76533450);
  }
  :is(.btn,.filter,.p-start,.nav-link):not(.rental-copy):hover{
    transform:translateY(-3px);
    filter:drop-shadow(0 4px 2px #76533455);
  }
}
@media(prefers-reduced-motion:reduce){.info-card,.btn,.filter,.p-start,.nav-link{transition:none!important;transform:none!important}}

/* Carry the same wax marks across navigation, tools and content surfaces. */
:root{--wax:url('./wax-strokes.png');--edge:url('./frames/teal.png')}
:is(.p-intro,.page-hero,.info-card,.p-trip-note,.weather-card,.marine-box,.rental-panel,.rental-group,.event-board,.empty-state,.p-search-form,dialog,.guide-reader){background-image:var(--wax)!important;background-size:190px 126px!important}
:is(.p-intro,.p-trip-note,.weather-card,.marine-box,.event-board,.empty-state,dialog,.guide-reader,.menu-toggle,.close-button,.p-search-form,.p-search-form button,.search input,.select-field,.rental-field input,.rental-field select,.rental-group-done){border:7px solid transparent!important;border-image:var(--edge) 35 / 7px stretch!important}
:is(.btn,.filter,.p-start,.nav-link,.menu-toggle,.close-button,.p-search-form button,.rental-group-done,.tag,.region-tag,.status-badge,.p-result,.search input,.select-field,.rental-field input,.rental-field select){background-image:var(--wax)!important;background-size:130px 86px!important}
:is(.p-categories a,.p-start,.btn,.filter,.nav-link){background-image:var(--wax)!important}
.p-categories a:nth-child(1){background-color:#ffe1d9!important;--edge:url('./frames/coral.png')}
.p-categories a:nth-child(2){background-color:#daeffc!important;--edge:url('./frames/blue.png')}
.p-categories a:nth-child(3){background-color:#e4efc6!important;--edge:url('./frames/green.png')}
.p-categories a:nth-child(4){background-color:#fff0bf!important;--edge:url('./frames/yellow.png')}
.p-categories a:nth-child(5){background-color:#d8f0e7!important}
.p-categories a:nth-child(6){background-color:#efdef7!important;--edge:url('./frames/purple.png')}
.p-categories a::before{border-image-source:var(--edge)}
.p-start,.p-search-form button,.rental-copy{background-color:#ffdb72!important;color:#51392b!important}
.p-categories .crayon-icon{display:none}
.p-categories a strong::before{content:'';display:block;width:clamp(38px,7vw,86px);aspect-ratio:1;margin:0 auto 5px;background:url('./crayon-icons.png') 0 0/300% 200% no-repeat}
.p-categories a[href="#/guides"] strong::before{background-position:50% 0}
.p-categories a[href="#/transport"] strong::before{background-position:100% 0}
.p-categories a:nth-child(4) strong::before{background-position:0 100%}
.p-categories a:nth-child(5) strong::before{background-position:50% 100%}
.p-categories a:nth-child(6) strong::before{background-position:100% 100%}
.site-header,.site-footer,.p-guide-row,.detail-section{border-image:url('./frames/yellow.png') 35 stretch}

/* One visible wax frame per panel, including the highlighted forecast. */
:is(.weather-card,.marine-box,.p-trip-note,.p-intro)::before{content:none!important}
.weather-card{--edge:url('./frames/yellow.png')}
.p-trip-note{--edge:url('./frames/coral.png')}
body .weather-card:first-child{background:#fff2c7 var(--wax) repeat!important}
body .p-categories a:nth-child(n){background:var(--tile,#d8f0e7) var(--wax) repeat!important;background-size:150px 100px!important;align-self:stretch}
.p-categories a:nth-child(1){--tile:#ffe1d9}
.p-categories a:nth-child(2){--tile:#daeffc}
.p-categories a:nth-child(3){--tile:#e4efc6}
.p-categories a:nth-child(4){--tile:#fff0bf}
.p-categories a:nth-child(6){--tile:#efdef7}
.p-categories{grid-auto-rows:1fr}
.p-categories a strong::after,.p-note-bottom{border-image:url('./frames/yellow.png') 35 stretch}
.site-header .main-nav .nav-link:nth-child(n){background:#f3ebda var(--wax) repeat!important;border:5px solid transparent!important;border-image:var(--edge) 35 / 5px stretch!important}
.site-header .main-nav .nav-link[aria-current=page]{background:#ffe39b var(--wax) repeat!important;--edge:url('./frames/yellow.png')}
@media(max-width:760px){
 .site-header .main-nav.open{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:2px!important}
 .site-header .main-nav .nav-link:nth-child(n){padding:0!important;min-width:0;min-height:44px;justify-content:center;font-size:clamp(11px,3.4vw,15px);white-space:nowrap}
 .site-header .main-nav .nav-link svg{display:none}
}

.p-categories a strong::before{width:clamp(49px,8.5vw,96px)}
.p-categories a strong{font-size:clamp(19px,2.6vw,25px)!important}
@media(max-width:760px){
 .p-categories a strong::before{width:clamp(45px,13vw,68px)}
 .site-header .main-nav .nav-link:nth-child(n){font-size:clamp(13px,4vw,17px)}
}

/* Keep dark ink on pale paper in both filter states. */
main .filters .filter:nth-child(n),main .guide-card .btn,main a.btn[href^="#/guides/"]{
 background:#fff8e7 var(--wax) repeat!important;
 background-size:130px 86px!important;
 color:#453428!important;
}
main .filters .filter[aria-pressed=true]{text-decoration:underline;text-underline-offset:4px}
main .rental-group[open]>summary,main .rental-group>summary{
 background:#fff6e2 var(--wax) repeat!important;
 background-size:150px 100px!important;
}
main .rental-inquiry{
 border:10px solid transparent!important;
 border-image:url('./frames/teal.png') 35 / 10px stretch!important;
 padding-inline:clamp(10px,3vw,24px);
 box-shadow:none!important;
}
main .rental-panel::before{content:none!important}

/* Expand the illustration across the banner, with a paper wash under text. */
main .p-intro,main .page-hero{
 display:block!important;
 min-height:clamp(250px,33vw,400px);
 background:linear-gradient(90deg,#fff9ecfa 0%,#fff9eceb 35%,#fff9ec2b 85%),url('./assets/okinawa-crayon.webp') center 56% / cover no-repeat!important;
}
main .p-intro-copy,main .page-hero-copy{max-width:39rem}
main .p-cover,main .okinawa-category-photo{display:none!important}
@media(max-width:600px){
 main .p-intro,main .page-hero{
  min-height:300px;
  background:linear-gradient(180deg,#fff9ecfa 0%,#fff9eceb 40%,#fff9ec22 90%),url('./assets/okinawa-crayon.webp') center / cover no-repeat!important;
  padding-bottom:64px!important;
 }
}

/* Replace the old purple focus ring while keeping keyboard focus visible. */
main .select-field:focus{outline:none!important;box-shadow:none!important}
main .select-field:focus-visible{
 outline:2px dashed #286b62!important;
 outline-offset:2px;
}
main .select-field{color:#453428!important}
:is(.tide-current,.tide-next,.tide-events,.detail-facts>div,.dialog-notice,.rental-preview,.table-note,.p-guide-row,.guide-full-text){
 background:#fff8e9 var(--wax) repeat!important;
 background-size:165px 110px!important;
}
:is(.tide-current,.tide-next,.detail-facts>div,.dialog-notice,.table-note){
 border:6px solid transparent!important;
 border-image:var(--edge) 35 / 6px stretch!important;
}

.planner-form{display:flex;gap:12px;flex-wrap:wrap;align-items:end}
.planner-form label{display:grid;gap:5px;min-width:0;max-width:100%}
.planner-form input{font:inherit;padding:8px;color:#453428}
#trip-days li{margin-block:8px}
#trip-planner{padding-bottom:24px}

.footer-social {
  margin-block: 18px;
}
.footer-social h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.footer-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-social-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 5px solid transparent;
  border-image: var(--social-edge) 35 / 5px stretch;
  background: #fff6df var(--wax) 0 0 / 130px 86px;
  color: #49382c;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}
.footer-social-link:hover {
  background-color: #ffebbb;
  text-decoration: underline;
}
.footer-social-link .icon {
  width: 15px;
  height: 15px;
}

.card-reel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .36s cubic-bezier(.22,1,.36,1);
}
.card-reel.is-open {
  grid-template-rows: 1fr;
}
.card-reel-content {
  min-height: 0;
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .card-reel { transition: none; }
}
.info-card .card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}
.card-title-group {
  min-width: 0;
}
.card-top-actions {
  display: grid;
  justify-items: end;
  gap: 4px;
}
.card-top-actions .card-reel-toggle {
  min-height: 44px;
  min-width: 44px;
  padding: 4px 8px;
  font-size: .82rem;
  white-space: nowrap;
}
.place-title-line {
  display: block;
  overflow: clip;
  white-space: nowrap;
}
.place-title-line > span {
  display: inline-block;
  transform: scale(var(--title-scale, 1));
  transform-origin: left center;
}
.place-title-original {
  margin-top: .2rem;
  font-size: .8em;
  line-height: 1.4;
  font-weight: 500;
}
.card-reel-player {
  max-width: 420px;
  height: clamp(460px, 160vw, 720px);
}
.card-reel-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fffaf0;
}
.card-reel-content > a {
  display: inline-block;
  margin: 8px 0 14px;
}

/* Inset the guide copy and keep the arrow in its own space. */
#main .p-guide-main{min-width:0}
#main .p-guide-row{
  padding-inline:clamp(14px,4vw,22px);
  gap:12px;
}
#main .p-guide-row > div{min-width:0;overflow-wrap:anywhere}
#main .p-guide-row > .icon{flex:0 0 18px}

.p-categories a[href="#/activities"] strong::before{display:none}
.p-categories a[href="#/activities"] .crayon-icon{display:block;width:clamp(49px,8.5vw,96px);height:auto;aspect-ratio:1}
.guide-offers{margin:28px 0 36px}
#guide-list-title{margin-bottom:0}

.weather-scroll-hint{display:none;margin:0;color:var(--muted);font-size:.75rem}
@media(max-width:630px){.weather-scroll-hint{display:block}}

/* Leave room inside the scroll area for the lifted forecast cards. */
.live-site .weather-grid{
  grid-template-columns:repeat(5,minmax(7rem,1fr));
  gap:8px;
  overflow-x:auto;
  padding:12px 0 14px;
  scroll-snap-type:x proximity;
}
.live-site .weather-grid:focus-visible{outline:2px solid var(--sea);outline-offset:2px}
.live-site .weather-card{
  min-width:0;
  padding:7px 6px;
  scroll-snap-align:start;
}
.live-site .weather-card:first-child{display:block;grid-column:auto}
.live-site .weather-card .weather-day{flex-wrap:nowrap;gap:4px;font-size:.8rem}
.live-site .weather-day time{font-size:.72rem;font-weight:400;color:var(--muted)}
.live-site .weather-card .weather-symbol{
  height:auto;
  margin:6px 0 3px;
  gap:3px;
}
.live-site .weather-symbol .icon{width:20px;height:20px;flex-shrink:0}
.live-site .weather-symbol span{font-size:.72rem;line-height:1.35}
.live-site .weather-card .temps{
  font-size:1.4rem;
  line-height:1.28;
  text-align:start;
}
.live-site .weather-card:first-child .temps{
  color:#493353;
  font-size:1.65rem;
  font-weight:800;
}
.live-site .temps small{font-size:.6em}
.live-site .weather-card .rain{margin:3px 0 6px;gap:3px;font-size:.72rem}
.live-site .rain .icon{width:12px;height:12px}
.live-site .weather-card .clothing{min-height:0;padding-top:5px;font-size:.72rem;line-height:1.45}

.home-marine{display:grid;gap:16px;margin-top:12px}
.wave-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:8px}
.wave-heading h3{display:flex;align-items:center;gap:6px;margin:0;font-size:1.05rem}
.wave-heading .icon{width:20px;height:20px;color:var(--sea)}
.wave-heading span,.wave-note{color:var(--muted);font-size:.78rem}
.wave-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;list-style:none;margin:0;padding:0}
.wave-grid .marine-box{display:grid;justify-items:center;gap:2px;padding:6px 0;text-align:center}
.wave-grid strong{font-size:.78rem;white-space:nowrap}
.wave-grid .marine-box span{font-size:1rem;font-weight:700;color:#493353;white-space:nowrap}
.wave-grid small{font-size:.72rem;font-weight:500}
.wave-note{line-height:1.65;margin:7px 0 0}
.wave-note a{display:inline-block;margin-inline-start:.35em;text-decoration:underline}
@media(min-width:760px){
  .live-site .weather-card,.wave-grid .marine-box{padding:10px 12px}
  .wave-grid{gap:10px}
}

.stay-facts {
  display: grid;
  gap: .4rem;
  margin: .7rem 0 .35rem;
  padding-top: .7rem;
  border-top: 1px solid #ad92684d;
  font-size: .9rem;
  line-height: 1.55;
}
.stay-facts > div {
  display: grid;
  grid-template-columns: 5.4em minmax(0, 1fr);
  gap: .4em;
}
.stay-facts dt { font-weight: 700; }
.stay-facts dd { margin: 0; }
.stay-facts-source {
  align-self: flex-start;
  margin-bottom: .9rem;
  font-size: .82rem;
  text-underline-offset: .2em;
}
.info-card[data-category="stays"] .card-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.info-card[data-category="stays"] .card-actions > .btn {
  min-width: 0;
  min-height: 44px;
  padding-inline: 4px;
  white-space: nowrap;
}

.transport-info {
  display: grid;
  gap: .55rem;
  margin: 0 0 .6rem;
  font-size: .9rem;
  line-height: 1.55;
}
.transport-info > div {
  display: grid;
  grid-template-columns: 2.7em minmax(0, 1fr);
  gap: .5em;
}
.transport-info dt { font-weight: 700; }
.transport-info dd { display: grid; gap: .25em; margin: 0; }
.transport-source { align-self: flex-start; margin-bottom: .8rem; font-size: .82rem; }
.info-card[data-category="transport"] .card-actions { gap: 5px; }
.info-card[data-category="transport"] .card-actions > .btn {
  min-height: 44px;
  padding-inline: 7px;
  font-size: .8rem;
  white-space: nowrap;
}

.info-card[data-category="food"] .card-description > span { display: block; }
.info-card[data-category="food"] .card-actions { gap: 6px; margin-top: auto; padding-top: .65rem; }
.info-card[data-category="food"] .card-actions > .btn {
  min-height: 44px;
  padding-inline: 9px;
  white-space: nowrap;
}
.food-menu {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.food-menu th,
.food-menu td {
  padding: .55rem .35rem;
  border-bottom: 1px solid #ad92684d;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.food-menu th:last-child,
.food-menu td:last-child { white-space: nowrap; text-align: right; }

.live-site .site-header .main-nav{background:transparent}

.p-plan-actions{display:flex;flex-direction:column;align-items:flex-start;gap:12px}
.planner-result-link{
  min-height:48px;
  max-width:100%;
  background-color:#fff0bf!important;
  color:#51392b!important;
  font-weight:700;
  text-decoration:none;
}
.planner-result-link::before{border-image-source:url('./frames/yellow.png')}
.p-plan-finish{display:inline-flex;align-items:center;gap:8px;font-size:.9rem}
.p-plan-finish .icon{width:16px;height:16px}

#trip-planner .breadcrumb{margin:18px 0 12px}
#trip-planner h1{font-size:clamp(1.8rem,5vw,2.6rem);margin:0 0 12px}
.planner-steps{padding-inline-start:1.6em;margin:12px 0 20px;line-height:1.8}
.planner-links{display:flex;flex-wrap:wrap;gap:8px 14px;margin:12px 0}
.planner-note,.planner-leg,.planner-status{font-size:.87rem;line-height:1.6}
.planner-status:empty{display:none}
.planner-status,.planner-warning{color:#754332;font-weight:600}
.planner-picker{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.planner-picker label{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.planner-picker .btn,.planner-edit .btn{min-height:44px}
.planner-day{margin:16px 0}
.planner-day-heading,.planner-stop-title,.planner-edit{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px}
.planner-day-heading{justify-content:space-between}
.planner-day-heading h2{margin:0}
.planner-day-heading input,.planner-edit input{max-width:100%;font:inherit;color:inherit;border:1px solid var(--line);background:#fffdf6;padding:5px 7px;border-radius:4px}
.planner-day ol{list-style:none;margin:10px 0 0;padding:0}
.planner-stop{border-top:1px dashed #d3bd98;padding:10px 0}
.planner-stop-title span{font-variant-numeric:tabular-nums;color:#493353;font-weight:700}
.planner-leg{margin:4px 0 8px;color:var(--muted)}
.planner-leg a{white-space:nowrap}
.planner-edit input{width:4.2em}
.planner-edit button:disabled{opacity:.48;cursor:default}

.planner-flight-target{padding:10px 12px;background:#fff0bf var(--wax);border-left:4px solid #d3ac50;border-radius:7px;font-size:.9rem;font-weight:700;line-height:1.6}
.planner-day-summary,.planner-leave{color:var(--muted);font-size:.83rem}
.planner-leave{margin:5px 0 0}
.planner-airport{padding:12px 14px;margin-top:12px;border:2px solid #81ab91;border-radius:12px 8px 14px 10px;background:#f1f7ed var(--wax);color:#315543;line-height:1.6}
.planner-airport p{margin:5px 0;font-size:.88rem}
.planner-airport.danger{border-color:#b64b4d;background:#ffe6df var(--wax);color:#8b2f30}
.planner-airport a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.planner-undo{padding:8px 0;line-height:1.7}
.planner-undo[hidden]{display:none}
.planner-edit select{min-height:38px;max-width:100%;font:inherit;color:inherit;background:#fffdf6;border:1px solid var(--line);border-radius:4px;padding:5px}
.planner-form input[type=number]{width:7em}
.planner-edit label{white-space:nowrap}
@media(max-width:480px){
  .planner-edit{gap:8px}
  .planner-edit .btn{padding:8px 10px}
  .planner-form{align-items:start}
  .planner-airport{padding:10px}
}
.planner-day-nav{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.planner-day{scroll-margin-top:100px}
.planner-more summary{cursor:pointer;min-height:36px;display:list-item;line-height:1.6;padding:5px 0}
.planner-more{margin-top:5px;color:var(--muted);font-size:.83rem}
.planner-more .planner-edit{padding:6px 0;color:var(--ink)}
.planner-edit:empty{display:none}

.planner-airport > p{white-space:pre-line}

.wave-grid .wave-condition{font-size:.82rem;font-weight:700;color:#73559c;line-height:1.4}


.live-site #main .info-card .card-actions{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-auto-rows:minmax(48px,auto);
  align-items:stretch;
  gap:6px;
  margin-top:auto;
  padding-top:12px;
}
.live-site #main .info-card .card-actions > .btn{
  width:100%;
  min-width:0;
  min-height:48px;
  height:100%;
  margin:0;
  padding:8px 4px;
  font-size:.8rem;
  line-height:1.25;
  white-space:normal;
  overflow-wrap:anywhere;
  text-align:center;
}
.live-site #main .info-card .card-actions > .btn > .icon{display:none}
.live-site #main .info-card .card-trip-button{
  background-color:#e4f3fc!important;
  color:#326781!important;
}
.live-site #main .info-card .card-trip-button::before{border-image-source:url('./frames/blue.png')}

.site-header .header-brand{display:flex;flex-direction:column;align-items:flex-start;flex:0 0 auto;min-width:0;padding:8px 0}
.site-header .header-plan{margin:4px 0 0 58px;min-height:44px;padding:7px 12px;gap:6px;font-size:.9rem;line-height:1.4;max-width:calc(100% - 58px);white-space:normal;text-align:center}
.emergency-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
.emergency-actions .emergency-button{min-height:48px;margin:0;padding:10px 14px;line-height:1.4;font-size:1rem;background-color:#fff1d4!important;color:#633c31!important}
.emergency-actions .emergency-button:nth-child(2){background-color:#e4f1ed!important;color:#365e55!important}
.emergency-actions .emergency-button:nth-child(3){background-color:#e7eff8!important;color:#326781!important}
.emergency-actions .emergency-button:nth-child(2)::before{border-image-source:url('./frames/teal.png')}
.emergency-actions .emergency-button:nth-child(3)::before{border-image-source:url('./frames/blue.png')}
.emergency-details .emergency-call{font-size:1.2rem;min-height:52px;gap:10px}
.emergency-details .emergency-note{margin-top:20px;line-height:1.8}
@media(max-width:760px){
 .site-header .header-brand{grid-column:1;grid-row:1;align-self:center}
 .site-header .header-plan{margin-left:50px;max-width:calc(100% - 50px);font-size:.85rem;padding:7px 10px}
 .emergency-actions{gap:6px}
 .emergency-actions .emergency-button{padding:10px 12px;font-size:.95rem}
}

.header-plan > .icon,.emergency-button > .icon{width:21px;height:21px;flex:0 0 21px}
.emergency-actions .emergency-button{gap:7px}

/* Compact planner and visits share one baseline beneath the brand. */
.site-header .header-brand{padding:0}
.site-header .header-inner{min-height:70px;padding-top:6px;padding-bottom:2px}
.site-header .header-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 0 8px 58px}
.site-header .header-tools .header-plan{margin:0;max-width:none;white-space:nowrap;background-color:#fff0bd!important;color:#60462f!important;box-shadow:none}
.site-header .header-plan::before{border-image-source:url('./frames/yellow.png')}
.site-header .home-visit-counter{white-space:nowrap;line-height:1.4}
#main .p-intro{margin-top:12px!important}
.emergency-actions .friendly-icon{width:27px;height:27px;flex-basis:27px;stroke:#675747;fill:none;transform:rotate(-4deg)}
.emergency-actions .emergency-button:nth-child(2) .friendly-icon{transform:rotate(4deg)}
.emergency-pending{padding:24px 0;font-size:1.2rem;text-align:center;color:#675747}
@media(max-width:760px){
 .site-header .header-inner{min-height:66px;padding-top:4px;padding-bottom:2px}
 .site-header .header-tools{padding-left:50px;gap:6px}
 .site-header .header-tools .header-plan{font-size:.85rem;padding:7px 8px;gap:4px}
 .site-header .home-visit-counter{font-size:.72rem;gap:3px}
 .site-header .home-visit-counter .icon{width:14px;height:14px}
 #main .p-intro{margin-top:8px!important}
}
@media(max-width:360px){.site-header .header-tools{padding-left:0}}

/* The planner sits inside the home frame, directly below the visit count. */
.site-header .header-tools{justify-content:flex-end;padding:0 0 2px;min-height:22px}
.site-header .header-tools:empty{display:none}
#main .p-intro{margin-top:2px!important;padding-top:12px!important}
.intro-planner-row{display:flex;justify-content:flex-end;margin:0 0 8px}
#main .intro-planner{min-height:44px;padding:8px 13px;gap:8px;white-space:nowrap;background-color:#fff0bd!important;color:#60462f!important;box-shadow:none;font-size:.95rem}
#main .intro-planner::before{border-image-source:url('./frames/yellow.png')}
.intro-planner>.friendly-icon{width:29px;height:29px;flex:0 0 29px;stroke:#675747;fill:none;transform:rotate(-5deg)}
@media(max-width:760px){
 .site-header .header-tools{padding:0 0 2px;gap:0}
 #main .p-intro{margin-top:0!important;padding-top:10px!important}
 .intro-planner-row{margin:0 0 6px}
 #main .intro-planner{font-size:.9rem;padding:7px 11px}
}

/* Keep the complete wax frame clear of the header and card lift effect. */
#main .p-intro{margin-top:6px!important;border:7px solid transparent!important;border-image:url('./frames/teal.png') 35 / 7px stretch!important;overflow:visible;transform:none!important;translate:none!important}
#main .p-intro:hover{transform:none!important;translate:none!important;filter:none!important}
#trip-planner .planner-toggle-row{padding:10px 12px;margin:0 0 14px;border:7px solid transparent;border-image:url('./frames/teal.png') 35 / 7px stretch;background:#fff9ec var(--wax)}
.emergency-guide{line-height:1.8;overflow-wrap:anywhere}
.emergency-guide .emergency-small{font-size:.82rem;line-height:1.7;color:#695e51}
.emergency-numbers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:20px 0 10px}
.emergency-number{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:125px;padding:16px;background:#fff0ce;text-decoration:none;color:#643e32;border:5px solid transparent;border-image:url('./frames/coral.png') 35 / 5px stretch}
.emergency-number:nth-child(2){background-color:#e7f0e7;border-image-source:url('./frames/teal.png')}
.emergency-number:nth-child(3){background-color:#e5eff7;border-image-source:url('./frames/blue.png')}
.emergency-number strong{font-size:clamp(1.1rem,3vw,1.8rem);line-height:1.6;font-variant-numeric:tabular-nums}
.emergency-number small{font-size:.78rem}
.emergency-guide a:focus-visible,.emergency-guide summary:focus-visible{outline:3px solid #326781;outline-offset:3px}
.emergency-guide a:not(.btn):not(.emergency-number){text-decoration:underline;text-underline-offset:3px}
.emergency-section{margin:24px 0;padding-top:18px;border-top:2px dashed #caba9a}
.emergency-section h3{font-size:1.25rem;color:#365e55;margin:0 0 12px}
.emergency-location{padding:18px;background:#eef3e6;border:5px solid transparent;border-image:url('./frames/green.png') 35 / 5px stretch}
.emergency-guide .btn{min-height:44px;font-size:.92rem;line-height:1.5;white-space:normal;gap:6px;background-color:#fff0bd!important;color:#60462f!important;padding:10px 14px}
.emergency-location-status{min-height:1.8em;font-weight:700}
.emergency-location textarea{display:block;box-sizing:border-box;width:100%;margin:8px 0 12px;padding:12px;font:inherit;font-size:.9rem;line-height:1.7;resize:vertical;border:1px solid #acbba4;background:#fffdf7;color:#514537;border-radius:7px}
.emergency-tool-buttons{display:flex;flex-wrap:wrap;gap:10px}
.emergency-lesson{margin:12px 0;padding:12px 14px;background:#fff8e9;border:1px dashed #bfa67d;border-radius:9px}
.emergency-lesson summary{cursor:pointer;min-height:44px;display:list-item;align-content:center;font-weight:700;color:#60462f}
.emergency-lesson li+li{margin-top:12px}
.emergency-phrase{padding:12px;background:#e8f0ec;border-left:4px solid #6d9c8c;color:#365e55}
.emergency-filters{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin:16px 0}
.emergency-filters label{display:flex;align-items:center;gap:8px;min-height:44px}
.emergency-filters select{max-width:100%;min-height:44px;padding:8px;background:#fffdf7;border:1px solid #bba986;border-radius:7px;color:#514537}
.emergency-filters input{width:20px;height:20px;accent-color:#386f64}
.emergency-hospitals{display:grid;gap:16px}
.emergency-hospital{padding:18px;background:#fffaf0;border:5px solid transparent;border-image:url('./frames/teal.png') 35 / 5px stretch}
.emergency-hospital[hidden]{display:none!important}
.emergency-hospital h4{margin:4px 0;font-size:1.15rem;color:#365e55}
.emergency-area{font-size:.82rem;color:#975b44}
.emergency-hospital dl{display:grid;grid-template-columns:5.5em minmax(0,1fr);gap:8px 10px}
.emergency-hospital dt{font-weight:700}
.emergency-hospital dd{margin:0}
@media(max-width:600px){
 .emergency-numbers{grid-template-columns:1fr}
 .emergency-number{min-height:100px;padding:12px 16px}
 .emergency-number strong{font-size:1.7rem}
 .emergency-location,.emergency-hospital{padding:12px}
 .emergency-hospital dl{grid-template-columns:1fr;gap:2px}
 .emergency-hospital dd{margin-bottom:10px}
 .emergency-tool-buttons>.btn{flex:1 1 140px;justify-content:center}
}

/* Brand and planner share the top row, without reserving an empty left cell. */
#main .intro-topline{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;margin:0 0 16px}
#main .intro-topline .p-signature{display:flex;align-items:center;gap:10px;margin:0;min-width:0;line-height:1.5;font-size:1rem}
#main .intro-topline .p-signature>span{min-width:0;text-wrap:balance}
#main .intro-topline .p-signature>.icon{width:36px;height:36px;flex:0 0 36px}
#main .intro-topline .intro-planner{margin:0;justify-self:end;align-self:center}
@media(max-width:600px){
 #main .intro-topline{gap:8px;margin-bottom:12px}
 #main .intro-topline .p-signature{gap:6px;font-size:.75rem}
 #main .intro-topline .p-signature>.icon{width:30px;height:30px;flex-basis:30px}
 #main .intro-topline .intro-planner{font-size:.82rem;padding:7px 9px;gap:5px}
 #main .intro-topline .intro-planner>.friendly-icon{width:25px;height:25px;flex-basis:25px}
}

#detail-dialog:has(.emergency-details){transform-origin:center center;will-change:auto}
#detail-dialog .emergency-details .dialog-top{position:sticky;top:0;z-index:2;background:#fffaf0 var(--wax);padding-bottom:10px}
#detail-dialog .emergency-details .close-button{min-width:44px;min-height:44px;flex-shrink:0}

.hk-driving-callout{padding:18px;margin:20px 0;background:#eef4df var(--wax);border:6px solid transparent;border-image:url('./frames/green.png') 35 / 6px stretch;line-height:1.8;color:#425a45}
.hk-driving-callout strong{font-size:1.15rem}
.hk-driving-callout p{margin:8px 0 12px}
.hk-driving-callout .btn{white-space:normal;min-height:44px;background-color:#fff0bd!important;color:#60462f!important}

.car-insurance-guide figure{margin:28px auto;max-width:680px}.car-insurance-guide figure img{display:block;width:100%;height:auto;border-radius:12px}.car-insurance-guide figcaption{font-size:.88em;line-height:1.6;margin-top:8px;color:#6b6258}.car-insurance-guide table{width:100%;border-collapse:collapse}.car-insurance-guide td{padding:12px;border:1px solid #c8bdab;white-space:normal}.car-insurance-guide tr:first-child{font-weight:bold;background:#f5edda}

.insurance-localized-slide{background:#fff8e8;border:3px solid #d0ad60;border-radius:18px;padding:22px 18px 16px;position:relative;text-align:center;overflow:hidden;color:#493a30}
.insurance-localized-slide .insurance-slide-title{font-size:clamp(1.2rem,4vw,1.8rem);line-height:1.4;margin:0 0 14px;overflow-wrap:anywhere}
.insurance-slide-art{position:relative;width:100%;aspect-ratio:2.15;overflow:hidden;border-radius:14px}
.car-insurance-guide .insurance-slide-art img{position:absolute;top:-80%;left:0;width:100%;max-width:none;height:auto;border-radius:0}
.insurance-slide-summary{font-size:1rem;line-height:1.75;margin:16px 0 8px}.insurance-slide-page{display:block;font-size:.85rem;color:#786548;margin:8px 0}

/* Shared teaching pages use the same paper and wax marks as the eSIM dialog.
   Locale-independent: apply to every article, its contents and reading tools. */
.guide-reader{
 --guide-paper:#fffdf6;--guide-ink:#493a30;--guide-teal:#397b73;
 background-color:var(--guide-paper);color:var(--guide-ink);
 background-image:var(--wax)!important;background-size:190px 126px!important;
 padding-inline:clamp(12px,3vw,30px);
}
.guide-reader .guide-prose{
 background:transparent;border:0;border-radius:0;box-shadow:none;
 padding:clamp(18px,3vw,34px) clamp(4px,1.5vw,18px);
 color:var(--guide-ink);line-height:1.95;min-width:0;
}
.guide-reader .guide-prose :is(h1,h2,h3,h4){
 font-family:'LXGW WenKai TC','Noto Sans TC',sans-serif;
 font-weight:700;color:#514033;text-wrap:pretty;
}
.guide-reader .guide-prose .legacy-hero{
 background:transparent;border-bottom:2px dashed #c5b88f;padding-bottom:24px;
}
.guide-reader .guide-prose .legacy-eyebrow{color:#397b73;line-height:1.7}
.guide-reader .guide-prose a{color:#326e68;text-decoration-thickness:1px}
.guide-reader .guide-prose a:hover{color:#a6543e}
.guide-reader .guide-prose :is(.guide-toc,.legacy-airline-card,.legacy-app-card,.legacy-cbox,.legacy-step-card,.legacy-step-list>li,.legacy-check-item,.legacy-tip-card,.legacy-day-schedule,.legacy-f-card,.legacy-summary-card,.legacy-story-box,.legacy-l-item,.legacy-tip,.legacy-advanced-box,.legacy-luggage-box,.legacy-intro-box){
 background-color:#fffaf0;background-image:var(--wax);background-size:190px 126px;
 border:5px solid transparent;border-image:url('./frames/teal.png') 35 / 5px stretch;
 border-radius:17px 22px 19px 15px;box-shadow:0 3px 0 #a78f6c14;
}
.guide-reader .guide-prose .legacy-intro-box{padding:18px;margin:22px 0}
.guide-reader .guide-prose .guide-toc{
 background-color:#f4f0da;border-image-source:url('./frames/yellow.png');
 padding:18px;gap:12px;
}
.guide-reader .guide-toc button{
 background:#fffdf6 var(--wax);background-size:160px 106px;
 border:4px solid transparent;border-image:url('./frames/teal.png') 35 / 4px stretch;
 border-radius:12px 16px 13px 17px;color:#493a30;min-height:46px;
 font-family:inherit;line-height:1.6;padding:10px 14px;white-space:normal;
}
.guide-reader .guide-toc button:hover{background-color:#fff0bd}
.guide-reader :is(a,button):focus-visible{outline:3px solid #326e68;outline-offset:4px}
.guide-reader .guide-prose :is(.legacy-tip-box,.legacy-warn-card,.legacy-recommend-box,.legacy-notice,.legacy-highlight-box,.legacy-timing-box,.legacy-flow-box,.legacy-highlight){
 background:#fff3cf var(--wax);background-size:190px 126px;
 border:5px solid transparent;border-image:url('./frames/yellow.png') 35 / 5px stretch;
 border-radius:17px 12px 19px 15px;color:#57462f;
}
.guide-reader .guide-prose :is(.legacy-warn-card,.legacy-notice){
 background-color:#fff0e5;border-image-source:url('./frames/coral.png');
}
.guide-reader .guide-prose .legacy-day-heading{
 background:#eaf1df var(--wax);background-size:190px 126px;
 border-bottom:2px dashed #a7bb95;color:#45634e;
}
.guide-reader .guide-prose .legacy-day-heading p{color:#52654f}
.guide-reader .guide-prose :is(.legacy-step-num,.legacy-day-number,.legacy-time){
 background:#f8e9ae var(--wax);background-size:130px 86px;
 color:#5d4b30;border-radius:9px 12px 8px 11px;
}
.guide-reader .guide-prose :is(.legacy-badge,.legacy-tag,.legacy-app-tag,.legacy-hero-badge){
 background:#ece5f2 var(--wax);background-size:130px 86px;color:#70537c;
 border-radius:8px 12px 9px 13px;
}
.guide-reader .guide-prose .legacy-map-link{
 background:#e4f0e7 var(--wax);background-size:130px 86px;
 border:3px solid transparent;border-image:url('./frames/teal.png') 35 / 3px stretch;
 border-radius:10px 13px 9px 12px;color:#326e68;
}
.guide-reader .guide-table-scroll{border-radius:10px;overscroll-behavior-x:contain}
.guide-reader .guide-prose table{
 background:#fffaf0 var(--wax);background-size:190px 126px;
 border:2px solid #b6c7a6;box-shadow:none;
}
.guide-reader .guide-prose :is(th,td){
 background:transparent;border-color:#cecfb8;color:#493a30;
 line-height:1.7;vertical-align:top;
}
.guide-reader .guide-prose :is(thead th,tr:first-child th,.car-insurance-guide tr:first-child td){
 background:#e4eddb var(--wax);background-size:160px 106px;color:#385d4b;
}
.guide-reader .guide-prose tbody tr:nth-child(even){background-color:#e7d7b026}
.guide-reader .guide-prose .airport-souvenir-photo{
 background:#fffaf0 var(--wax);background-size:190px 126px;
 border:4px solid transparent;border-image:url('./frames/teal.png') 35 / 4px stretch;
 border-radius:14px 19px 16px 12px;box-shadow:0 3px 0 #a78f6c14;
}
.guide-reader .guide-prose .insurance-localized-slide{
 background:#fff8e8 var(--wax);background-size:190px 126px;
 border:6px solid transparent;border-image:url('./frames/yellow.png') 35 / 6px stretch;
}
.guide-reader .guide-prose .legacy-back-section{border-top:2px dashed #b7c5a4}
@media(max-width:640px){
 .guide-reader{padding-inline:12px}
 .guide-reader .guide-prose{padding:18px 3px;font-size:1rem;line-height:1.95}
 .guide-reader .guide-prose h1{font-size:clamp(1.6rem,7vw,2rem);line-height:1.6}
 .guide-reader .guide-prose .guide-toc{padding:14px 10px}
 .guide-reader .guide-toc button{width:100%;padding:10px 12px;text-align:start}
 .guide-reader .guide-prose .legacy-intro-box{padding:14px 10px}
 .guide-reader .guide-prose .legacy-day-schedule{margin-inline:0}
}
