/* Booking cards and actions. Keep the photo within its own grid track. */
.ryokan-card,.ryokan-card .card-photo,.ryokan-card .card-content{min-width:0;box-sizing:border-box}
.ryokan-card .card-photo{position:relative;width:100%;max-width:100%;overflow:hidden}
.ryokan-card .card-photo>a{position:absolute;inset:0;display:block;width:100%;height:100%}
.ryokan-card .card-photo>a>img{display:block;width:100%;height:100%;max-width:100%;object-fit:cover}
.ryokan-card .card-content{container-type:inline-size;container-name:hotel-content}
.ryokan-card .card-content h3{overflow-wrap:anywhere}
.ryokan-card .card-bottom{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);gap:10px;align-items:stretch;margin-top:20px}
.ryokan-card .card-bottom>.button{min-width:0;width:100%;max-width:100%;min-height:46px;padding:12px 10px;line-height:1.45;font-size:13px;box-sizing:border-box;justify-content:center}
.ryokan-card .card-bottom>.booking-cta{grid-column:1/-1;grid-row:1;flex-direction:row;gap:8px}
.ryokan-card .card-bottom>.button:first-child{grid-row:2;grid-column:1}
.ryokan-card .card-bottom>.compare-button{grid-column:2;grid-row:2;min-width:0;width:100%;min-height:46px;justify-content:center;gap:6px;margin:0;padding:10px 6px;border:1px solid #dddcd4;border-radius:3px;background:transparent;font-size:13px;line-height:1.45}
.ryokan-card .card-bottom .icon{width:17px;height:17px;flex:none}
.ryokan-card .card-bottom>.booking-cta span{white-space:normal}
.ryokan-card .onsen-card-rating{margin-top:17px}
@container hotel-content (min-width:450px){
 .ryokan-card .card-bottom{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) auto}
 .ryokan-card .card-bottom>.button:first-child{grid-column:1;grid-row:1}
 .ryokan-card .card-bottom>.booking-cta{grid-column:2;grid-row:1}
 .ryokan-card .card-bottom>.compare-button{grid-column:3;grid-row:1;padding:10px 12px}
}
.booking-cta{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:10px;min-width:0;min-height:48px;box-sizing:border-box;font-size:15px;line-height:1.5;padding:13px 22px}
.booking-cta span{white-space:normal}
.ryokan-detail .booking-bar{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,340px);gap:24px;align-items:center;padding:28px 30px;margin:28px 0 0;border:1px solid #dedfd6;background:#f4f3ed}
.ryokan-detail .booking-bar>div{min-width:0;flex:initial}
.ryokan-detail .booking-overview{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:26px;align-items:center}
.booking-price h2{margin:0;font-size:clamp(18px,2vw,22px);line-height:1.5;font-weight:600}
.booking-times{display:flex;flex-wrap:wrap;gap:20px;margin:0;padding-left:22px;border-left:1px solid #d8dacf}
.booking-times>div{min-width:56px}
.booking-times dt{font-size:12px;color:#657068;margin:0 0 4px;line-height:1.5}
.booking-times dd{font-size:17px;font-weight:500;margin:0;line-height:1.5}
.booking-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:stretch}
.booking-actions>.button{min-width:0;width:100%;margin:0;min-height:48px;padding:12px 14px;box-sizing:border-box;justify-content:center;line-height:1.5}
.booking-actions>[data-compare]{font-size:13px;gap:6px;white-space:nowrap}
.booking-actions .icon{width:18px;height:18px;flex:none}
.booking-bar .public-price{margin:0}
.booking-bar .public-price strong{font-size:26px;line-height:1.4}
.booking-bar .price-fx{font-size:13px;line-height:1.7}
.booking-recommendation.affiliate-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;align-items:center;padding:24px;margin:28px 0;border:1px solid #dddcd4}
.booking-recommendation.affiliate-panel h3{font-size:20px;line-height:1.5;margin:3px 0 0;overflow-wrap:anywhere}
.booking-recommendation .location-label{margin:0}
.booking-recommendation .affiliate-actions{display:block;margin:0}
.booking-recommendation .booking-cta{min-width:210px}
.booking-recommendation .dual-affiliate-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:min(460px,52vw)}
.booking-recommendation .dual-affiliate-actions .booking-cta{min-width:0;width:100%;margin:0}
/* Legacy article CTAs can contain two direct links without an actions wrapper. Keep both links aligned. */
.booking-recommendation.affiliate-panel:has(> .button + .button){grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 10px}
.booking-recommendation.affiliate-panel:has(> .button + .button)>p{grid-column:1/-1;margin:0}
.booking-recommendation.affiliate-panel:has(> .button + .button)> .button{width:100%;min-width:0;margin:0;box-sizing:border-box}
@media(min-width:761px){
 .hotel-results:not(.grid-view) .list-card{grid-template-columns:minmax(0,32%) minmax(0,1fr);align-items:stretch}
 .hotel-results:not(.grid-view) .list-card .card-photo{width:100%;height:auto;min-height:260px;aspect-ratio:auto;align-self:stretch}
}
@media(max-width:1100px){
 .ryokan-detail .booking-bar{grid-template-columns:minmax(0,1fr);padding:24px;gap:22px}
 .booking-actions{grid-template-columns:minmax(0,1fr) minmax(120px,.45fr)}
 .booking-recommendation .dual-affiliate-actions{min-width:min(420px,50vw)}
}
@media(max-width:760px){
  /* Every mobile affiliate CTA group gets one predictable vertical flow. */
  .affiliate-actions,
  .affiliate-actions.dual-affiliate-actions,
  .booking-recommendation .affiliate-actions,
  .booking-recommendation .dual-affiliate-actions{
   display:grid;
   grid-template-columns:minmax(0,1fr)!important;
   width:100%;
   min-width:0;
   max-width:100%;
   gap:10px;
  }
  .affiliate-actions > .button,
  .affiliate-actions > .booking-cta,
  .booking-recommendation .affiliate-actions > .button,
  .booking-recommendation .affiliate-actions > .booking-cta{
   width:100%;
   min-width:0;
   max-width:100%;
   box-sizing:border-box;
   white-space:normal;
   overflow-wrap:anywhere;
  }
  .affiliate-actions .booking-cta span,
  .booking-recommendation .affiliate-actions .booking-cta span{white-space:normal}
  .hotel-results .list-card{display:grid;grid-template-columns:minmax(0,1fr)}
 .hotel-results .list-card .card-photo{width:100%;height:auto;min-height:0;aspect-ratio:4/3}
 .booking-recommendation.affiliate-panel{grid-template-columns:minmax(0,1fr);gap:18px;padding:20px}
 .booking-recommendation .booking-cta{min-width:0;width:100%}
 .booking-recommendation .dual-affiliate-actions{grid-template-columns:minmax(0,1fr);min-width:0;width:100%}
 .booking-recommendation.affiliate-panel:has(> .button + .button){grid-template-columns:minmax(0,1fr)}
 .booking-recommendation.affiliate-panel:has(> .button + .button)>p{grid-column:auto}
 .ryokan-detail .booking-bar{padding:20px;gap:20px}
 .ryokan-detail .booking-overview{grid-template-columns:minmax(0,1fr);gap:16px}
 .booking-times{border-left:0;padding:0;gap:28px}
 .booking-actions{grid-template-columns:minmax(0,1fr)}
 .booking-actions>.button{font-size:14px}
  .booking-actions>[data-compare]{min-height:44px;background:transparent}
}
@media(forced-colors:active){.booking-bar,.booking-recommendation.affiliate-panel,.ryokan-card{border:1px solid CanvasText}}

.ryokan-card .card-bottom:not(:has(.booking-cta)){grid-template-columns:minmax(0,1fr) auto}
.ryokan-card .card-bottom:not(:has(.booking-cta))>.button:first-child{grid-column:1;grid-row:1}
.ryokan-card .card-bottom:not(:has(.booking-cta))>.compare-button{grid-column:2;grid-row:1;padding-inline:14px}
.booking-bar .price-summary{margin:0;min-width:0}
.booking-bar .price-summary strong{font-size:26px;line-height:1.4}
.booking-bar .price-unit{display:block;font-size:13px;line-height:1.7;white-space:normal}
.booking-bar .price-conversion{display:block;font-size:14px;line-height:1.7;white-space:normal}
.booking-bar .price-summary p{margin:8px 0 0;font-size:12px;line-height:1.7}
/* Width is explicit because cards also appear in a flex results column. */
.ryokan-card{width:100%;align-self:stretch}
.onsen-ryokan-incoming{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0;padding:12px 15px;border-left:3px solid #356855;background:#eef3ed;font-size:13px}.onsen-ryokan-incoming span{color:#59665f}

@media(max-width:760px){
 .hotel-grid .ryokan-card .card-bottom,
 .ryokan-card .card-bottom:not(:has(.booking-cta)){
  display:grid;
  grid-template-columns:minmax(0,1fr)!important;
  gap:8px;
  width:100%;
  max-width:100%;
  margin-inline:0;
 }
 .hotel-grid .ryokan-card .card-bottom > *,
 .ryokan-card .card-bottom:not(:has(.booking-cta)) > *{
  grid-column:1!important;
  grid-row:auto!important;
  min-width:0;
  max-width:100%;
  width:100%;
  box-sizing:border-box;
 }
 .hotel-grid .ryokan-card .card-bottom .button,
 .hotel-grid .ryokan-card .card-bottom .compare-button{
  padding-inline:8px;
  overflow-wrap:anywhere;
 }
}
