/* ROOMNOW v7.6.3 — mobile density, language access, community/recruit polish */

/* Mobile language selector lives beside the hamburger, not inside the menu. */
.mobile-header-lang{display:none;position:relative;z-index:120}
@media(max-width:900px){
  .header-inner{position:relative}
  .mobile-header-lang{display:block!important;margin-left:auto}
  .mobile-header-lang + .mobile-menu-button{margin-left:7px!important}
  .mobile-header-lang .lang-switcher-button{
    min-width:82px!important;height:44px!important;padding:0 10px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
    border:1px solid rgba(225,203,156,.24)!important;border-radius:13px!important;
    background:linear-gradient(180deg,rgba(23,27,30,.97),rgba(10,14,17,.97))!important;
    color:#e9d5ab!important;font-size:10px!important;font-weight:850!important;line-height:1!important;
    box-shadow:0 8px 24px rgba(0,0,0,.16)
  }
  .mobile-header-lang .lang-globe{font-size:10px!important;color:#d4b873!important}
  .mobile-header-lang .lang-caret{font-size:8px!important;opacity:.72}
  .mobile-header-lang .lang-switcher-menu{
    position:absolute!important;top:50px!important;right:0!important;left:auto!important;width:164px!important;
    padding:7px!important;border:1px solid rgba(225,203,156,.22)!important;border-radius:13px!important;
    background:rgba(8,12,15,.985)!important;box-shadow:0 20px 55px rgba(0,0,0,.46)!important;z-index:150!important
  }
  .mobile-header-lang .lang-switcher-menu a{display:block!important;padding:10px 11px!important;border-radius:8px!important;font-size:10.5px!important;line-height:1.2!important}
  .mobile-header-lang .lang-switcher-menu a.is-current{background:rgba(216,185,119,.10)!important;color:#efd89d!important}
  .mobile-menu .mobile-lang-row{display:none!important}
}
@media(max-width:420px){
  .mobile-header-lang .lang-switcher-button{min-width:72px!important;padding:0 8px!important}
  .mobile-header-lang .lang-current-label{font-size:9.5px!important}
}

/* Home mobile: tighten the large vertical gaps between major sections. */
@media(max-width:720px){
  body[data-page-type="home"] .v8-featured-section{padding-top:30px!important;padding-bottom:14px!important}
  body[data-page-type="home"] #categories{padding-top:28px!important;padding-bottom:22px!important}
  body[data-page-type="home"] .home-quick-directory{padding-top:28px!important;padding-bottom:28px!important}
  body[data-page-type="home"] .live-home-section{padding-top:28px!important;padding-bottom:28px!important}
  body[data-page-type="home"] .intro-video-section{padding:30px 0 32px!important}
  body[data-page-type="home"] .editorial-section{padding:24px 0 25px!important}
  body[data-page-type="home"] #today{padding-top:22px!important;padding-bottom:28px!important}
  body[data-page-type="home"] #price{padding-top:28px!important;padding-bottom:28px!important}
  body[data-page-type="home"] #guide{padding-top:28px!important;padding-bottom:26px!important}
  body[data-page-type="home"] #contact{padding-top:28px!important;padding-bottom:48px!important}
  body[data-page-type="home"] .home-section + .home-section{margin-top:0!important}
  body[data-page-type="home"] .seo-summary{margin-top:16px!important}

  /* Five categories: make the final premium tier an intentional full-width feature card. */
  body[data-page-type="home"] .category-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  body[data-page-type="home"] .category-grid .category-card:last-child{
    grid-column:1/-1!important;display:grid!important;grid-template-columns:42% minmax(0,1fr)!important;align-items:stretch!important;min-height:148px!important
  }
  body[data-page-type="home"] .category-grid .category-card:last-child>img{width:100%!important;height:100%!important;min-height:148px!important;object-fit:cover!important}
  body[data-page-type="home"] .category-grid .category-card:last-child .category-body{padding:15px 16px!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
  body[data-page-type="home"] .category-grid .category-card:last-child .category-price{margin-top:10px!important}
}
@media(max-width:390px){
  body[data-page-type="home"] .category-grid .category-card:last-child{grid-template-columns:40% minmax(0,1fr)!important}
  body[data-page-type="home"] .category-grid .category-card:last-child .category-body{padding:13px!important}
}

/* Community: get the actual board into the first mobile viewport sooner. */
@media(max-width:720px){
  body[data-page-type="community"] .community-hero{padding:30px 0 24px!important}
  body[data-page-type="community"] .community-hero h1{margin-bottom:10px!important}
  body[data-page-type="community"] .community-hero .lead{margin-bottom:0!important;line-height:1.65!important}
  body[data-page-type="community"] .community-section{padding-top:22px!important;padding-bottom:34px!important}
  body[data-page-type="community"] .community-notice{margin-bottom:10px!important;padding:10px 12px!important}
  body[data-page-type="community"] .community-toolbar{padding:12px 13px!important}
  body[data-page-type="community"] .community-loading,
  body[data-page-type="community"] .community-empty{padding:28px 13px!important}
}

/* Recruit: compact vertical rhythm without crowding the questionnaire controls. */
@media(max-width:720px){
  body[data-page-type="recruit"] .page-hero{padding:30px 0 25px!important}
  body[data-page-type="recruit"] .recruit-hero{gap:18px!important}
  body[data-page-type="recruit"] .recruit-photo{margin-top:2px!important}
  body[data-page-type="recruit"] .recruit-match-section{margin-top:0!important;padding-top:20px!important;padding-bottom:28px!important}
  body[data-page-type="recruit"] .recruit-match-intro,
  body[data-page-type="recruit"] .recruit-match-app{padding:17px!important}
  body[data-page-type="recruit"] .recruit-match-intro h2{margin-bottom:9px!important}
  body[data-page-type="recruit"] .recruit-match-points{gap:7px!important;margin-top:14px!important}
  body[data-page-type="recruit"] .recruit-static-guide{margin-top:14px!important;padding:16px!important}
  body[data-page-type="recruit"] .recruit-track-grid{gap:9px!important}
  body[data-page-type="recruit"] .recruit-track-card{padding:13px!important}
  body[data-page-type="recruit"] main>.section:not(.recruit-match-section){padding-top:32px!important;padding-bottom:32px!important}
  body[data-page-type="recruit"] main + .section{padding-top:32px!important;padding-bottom:34px!important}
  body[data-page-type="recruit"] .section-head{margin-bottom:18px!important}
  body[data-page-type="recruit"] .cta{gap:18px!important}
}

@media(max-width:720px){
  html[lang="en"] .category-grid,html[lang="ja"] .category-grid,html[lang="zh-CN"] .category-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  html[lang="en"] .category-grid .category-card:last-child,html[lang="ja"] .category-grid .category-card:last-child,html[lang="zh-CN"] .category-grid .category-card:last-child{grid-column:1/-1!important;display:grid!important;grid-template-columns:42% minmax(0,1fr)!important;align-items:stretch!important}
  html[lang="en"] .category-grid .category-card:last-child>img,html[lang="ja"] .category-grid .category-card:last-child>img,html[lang="zh-CN"] .category-grid .category-card:last-child>img{width:100%!important;height:100%!important;min-height:145px!important;object-fit:cover!important}
  html[lang="en"] .category-grid .category-card:last-child .category-body,html[lang="ja"] .category-grid .category-card:last-child .category-body,html[lang="zh-CN"] .category-grid .category-card:last-child .category-body{padding:14px!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
}

/* Home category CTA: keep the existing box geometry, center only the label vertically. */
body[data-page-type="home"] .category-more{
  box-sizing:border-box!important;
  min-height:39px!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  line-height:1!important;
}
body[data-page-type="home"] .category-more::after{
  align-self:center!important;
  line-height:1!important;
}

/* v7.6.3 final mobile polish — density, language clarity, app mode */
@media(max-width:720px){
  /* Home: remove stacked section gaps without making content feel cramped. */
  body[data-page-type="home"] .home-section,
  body[data-page-type="home"] .section{scroll-margin-top:78px}
  body[data-page-type="home"] .section-head{margin-bottom:16px!important}
  body[data-page-type="home"] .category-grid{margin-top:20px!important}
  body[data-page-type="home"] .category-card{min-height:0!important}
  body[data-page-type="home"] .category-body{padding:14px!important}
  body[data-page-type="home"] .category-body p{margin-top:7px!important;margin-bottom:0!important}
  body[data-page-type="home"] .category-price{margin-top:12px!important}

  /* The CTA box was correct; only vertically center its text. */
  body[data-page-type="home"] .category-more{
    height:40px!important;min-height:40px!important;margin-top:12px!important;
    padding:0 2px!important;display:flex!important;align-items:center!important;
    line-height:40px!important;transform:none!important;vertical-align:middle!important
  }
  body[data-page-type="home"] .category-more::after{line-height:1!important;margin-top:0!important}

  /* Community: show the actual board much sooner. */
  body[data-page-type="community"] .community-hero{padding:24px 0 18px!important}
  body[data-page-type="community"] .community-hero h1{font-size:36px!important;line-height:1.1!important;margin:9px 0 10px!important}
  body[data-page-type="community"] .community-hero .lead{font-size:14px!important;line-height:1.65!important}
  body[data-page-type="community"] .community-section{padding:16px 0 28px!important}
  body[data-page-type="community"] .community-notice{margin-bottom:9px!important}
  body[data-page-type="community"] .community-toolbar{min-height:70px!important}
  body[data-page-type="community"] .community-loading,
  body[data-page-type="community"] .community-empty{padding:24px 12px!important}

  /* Recruit: screenshots showed stacked section padding creating large empty bands. */
  body[data-page-type="recruit"] .page-hero{padding:24px 0 20px!important}
  body[data-page-type="recruit"] .recruit-match-section{padding:14px 0 22px!important;margin-top:0!important}
  body[data-page-type="recruit"] main>.section:not(.recruit-match-section){padding:22px 0!important}
  body[data-page-type="recruit"] main>.section.alt{padding:18px 0!important}
  body[data-page-type="recruit"] main + .section{padding:22px 0 26px!important}
  body[data-page-type="recruit"] .section-head{margin-bottom:14px!important;gap:10px!important}
  body[data-page-type="recruit"] .section-head h2{margin-top:6px!important;margin-bottom:0!important}
  body[data-page-type="recruit"] .grid{gap:10px!important}
  body[data-page-type="recruit"] .card{padding:15px!important}
  body[data-page-type="recruit"] .quote{padding:17px!important}
  body[data-page-type="recruit"] .cta{padding:20px!important;gap:18px!important}
  body[data-page-type="recruit"] .cta h2{font-size:31px!important;line-height:1.22!important;margin:8px 0 12px!important}
  body[data-page-type="recruit"] .seo-content{padding-top:0!important;padding-bottom:0!important}
  body[data-page-type="recruit"] .seo-content h2{margin-top:0!important}
  body[data-page-type="recruit"] .recruit-track-grid{margin-top:12px!important}
}

/* Header language icon: a real recognizable globe glyph drawn in CSS. */
.lang-globe{font-size:0!important;position:relative;display:inline-block;width:14px;height:14px;border:1.4px solid currentColor;border-radius:50%;box-sizing:border-box;opacity:.95}
.lang-globe:before{content:"";position:absolute;left:5px;top:1px;width:2px;height:9px;border-left:1px solid currentColor;border-right:1px solid currentColor;border-radius:50%}
.lang-globe:after{content:"";position:absolute;left:2px;right:2px;top:5px;border-top:1px solid currentColor}

/* App-mode launcher injected into More menus. */
.rn-app-menu-item{width:100%;display:flex;align-items:center;gap:8px;border:0;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer;padding:10px 12px;border-radius:8px}
.rn-app-menu-item:hover,.rn-app-menu-item:focus-visible{background:rgba(222,200,154,.08);color:#ead7ad;outline:none}
.rn-app-menu-item>span:first-child{display:grid;place-items:center;width:19px;height:19px;border:1px solid rgba(222,200,154,.30);border-radius:5px;color:#d9bd7e;font-size:10px}
.mobile-more-menu .rn-app-menu-item{min-height:46px;padding:12px 14px;border-top:1px solid rgba(255,255,255,.06);border-radius:0;color:#ece7dc;font-weight:800}

/* Quiet PWA / fullscreen bottom sheet — never auto-opens. */
.rn-sheet-open{overflow:hidden}
.rn-app-sheet-wrap{position:fixed;inset:0;z-index:10050;pointer-events:none}
.rn-app-sheet-wrap.is-open{pointer-events:auto}
.rn-app-sheet-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.62);opacity:0;transition:opacity .22s ease;backdrop-filter:blur(3px)}
.rn-app-sheet{position:absolute;left:50%;bottom:16px;width:min(520px,calc(100% - 28px));transform:translate(-50%,calc(100% + 36px));opacity:0;transition:transform .24s ease,opacity .2s ease;border:1px solid rgba(222,200,154,.24);border-radius:24px;background:linear-gradient(155deg,#151512,#090c0f 72%);box-shadow:0 34px 90px rgba(0,0,0,.58);padding:27px 24px 23px;color:#f6f1e8}
.rn-app-sheet-wrap.is-open .rn-app-sheet-backdrop{opacity:1}.rn-app-sheet-wrap.is-open .rn-app-sheet{transform:translate(-50%,0);opacity:1}
.rn-app-sheet-handle{display:none}.rn-app-sheet-x{position:absolute;right:15px;top:13px;width:34px;height:34px;border:1px solid rgba(255,255,255,.10);border-radius:10px;background:rgba(255,255,255,.035);color:#cfc8bb;font-size:21px;line-height:1;cursor:pointer}
.rn-app-sheet-kicker{display:block;color:#d8bd7c;font-size:10px;font-weight:900;letter-spacing:.18em;margin-bottom:10px}.rn-app-sheet h2{margin:0 34px 9px 0;font-size:27px;line-height:1.18;letter-spacing:-.04em}.rn-app-sheet-desc{margin:0;color:#bdb7ad;font-size:13.5px;line-height:1.7}
.rn-app-sheet-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:19px}.rn-app-sheet-actions button{min-height:50px;border-radius:13px;font:inherit;font-size:12.5px;font-weight:900;cursor:pointer}.rn-app-primary{border:1px solid #d7b971;background:linear-gradient(135deg,#f0dbab,#c89e55);color:#17120a}.rn-app-primary:disabled{opacity:.58;cursor:default}.rn-app-secondary{border:1px solid rgba(222,200,154,.22);background:rgba(255,255,255,.035);color:#eee8dc}.rn-app-sheet-help{min-height:20px;margin:13px 2px 0;color:#9f9a91;font-size:11.5px;line-height:1.6}
@media(max-width:600px){
  .rn-app-sheet{bottom:0;width:100%;border-radius:24px 24px 0 0;padding:25px 20px calc(20px + env(safe-area-inset-bottom));}
  .rn-app-sheet-handle{display:block;width:42px;height:4px;margin:-12px auto 18px;border-radius:9px;background:rgba(255,255,255,.18)}
  .rn-app-sheet-actions{grid-template-columns:1fr}.rn-app-sheet-actions button{min-height:52px}
}
@media(display-mode:standalone){
  .site-header{padding-top:env(safe-area-inset-top)}
  .mobile-contact{padding-bottom:max(9px,env(safe-area-inset-bottom))}
}
