/* Existing colors are retained; only content-frame edges change. */
html body{--mosim-frame-radius:18px}
html body #mosimPage :is(.doctor-card,.hospital-detail-box,.member-service-frame,.metric-panel,.staff-join-box,.staff-member-consent-box,.master-analytics-card,.member-account-shell,.partner-staff-box,.slot-admin-box,.mosim-support-thread-frame,.scan-stage,.ai-card,.report-card,.metal-card,.hospital,.benefit-card,.apply-form,.workspace-card,.care-guide,.partner-shell,.service-drawer,.service-form,.member-account-card,.member-service-card,.member-hospital-card,.hospital-profile-card,.member-report-card,.member-partner-card,.tier-account-card,.international-entry,.hospital-entry,.account-grid>div,.master-kpi,.crm-kpi,.admin-service-section,.legacy-member-ops,.crm-create-wrap,.partner-master-box,.crm-filter-box,.crm-row,.crm-appointment-box,.crm-appointment-item,.crm-appointment-new,.crm-appointment-history,.counselor-identity,.counselor-schedule,.counselor-admin-wrap,.internal-staff-admin,.internal-staff-home,.internal-staff-row,.staff-referral-panel,.staff-referred-details,.hospital-profile-admin,.hospital-stats-box,.hospital-stat,.member-account-intro,.member-account-section,.account-interest-box,.master-summary-frame,.master-detail-record,.master-detail-field){border:0!important;border-radius:18px!important}
.mosim-market{padding-block:18px 22px;color:var(--ink,#1f2123)}
.mosim-market-control{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.mosim-market-control label{font-size:14px;font-weight:700}
html body #mosimPage #mosimServiceCountry{min-height:44px;padding:8px 38px 8px 14px;border:0!important;border-radius:18px!important;background:#538455;color:#fff;max-width:100%;font:inherit;font-size:14px;min-width:102px;font-weight:700;box-shadow:none;cursor:pointer;appearance:none!important;-webkit-appearance:none!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;background-size:14px 14px}
#mosimMarketHint{font-size:13px;color:#666b68;margin:10px 0;line-height:1.6}
.mosim-market-message{background:#fff;border:0;border-radius:18px;padding:16px 20px}
#mosimMarketNote{margin:0;line-height:1.75;font-size:14px;overflow-wrap:anywhere}
.mosim-market-status{display:inline-block;color:#508154;font-weight:700;font-size:13px;margin-bottom:8px}
html body #mosimPage .mosim-market-return{margin-top:18px;padding:10px 18px;min-height:44px;border:0!important;border-radius:18px!important;background:#508154;color:#fff;font:inherit;cursor:pointer}
#mosimMarket [hidden]{display:none!important}
#mosimServiceCountry:focus-visible{outline:2px solid #538455;outline-offset:3px}
.mosim-market-return:focus-visible{outline:3px solid #508154;outline-offset:3px}
body:is([data-service-country="TH"],[data-service-country="JP"]):not(.mosim-account-active) #mosimPage>.mosim-korea-content{display:none!important}
body:is([data-service-country="TH"],[data-service-country="JP"]):not(.mosim-account-active) #mosimPage>nav :is(.nav-links,.desktop-ai-btn,.mobile-ai-check,.desktop-apply-btn,.mobile-membership-apply){display:none!important}
body.mosim-account-active #mosimMarket,body.mosim-ai-active #mosimMarket{display:none!important}
body:is([data-service-country="TH"],[data-service-country="JP"]):not(.mosim-account-active) .mosim-market-message{min-height:0;padding-block:16px}
@media(max-width:760px){.mosim-market{width:calc(100% - 32px);padding-block:14px 18px}.mosim-market-message{padding:16px}.mosim-market-control{gap:10px}#mosimMarketNote{font-size:13px}}

/* Unified web frame geometry and mobile text flow. Keep functional focus rings. */
html body #mosimPage :is([class$="-card"],[class*="-card "],[class$="-frame"],[class*="-frame "],[class$="-box"],[class*="-box "],[class$="-panel"],[class*="-panel "],[class$="-shell"],[class*="-shell "],.mobile-card,.member-digital-card,.mosim-market-message),
html body :is(.login-box,.partner-shell,.native-ai-shell,.hospital-detail-shell,.service-drawer){
  border:0!important;border-radius:18px!important;box-sizing:border-box;min-width:0;
}
html body #mosimPage :is(button,.btn,.mobile-login,.mobile-my-mosim,.mobile-membership-apply,.mobile-ai-check,.desktop-login-btn,.desktop-apply-btn,.desktop-ai-btn,input:not([type="checkbox"]):not([type="radio"]),select,textarea),
html body :is(.lang-switcher-side>summary,.desktop-language-control,.account-language-control>summary,.mosim-chat-launcher){border:0!important;border-radius:18px!important}
html body #mosimPage :is(.btn,button,.mobile-login,.mobile-my-mosim,.mobile-membership-apply,.mobile-ai-check){white-space:normal;overflow-wrap:anywhere;text-align:center;line-height:1.4}
html body #mosimPage :is(.section-head,.mosim-market-message,.mosim-business-info,.footer-grid)>*{min-width:0;max-width:100%;box-sizing:border-box}
html body #mosimPage .mosim-business-info,html body #mosimPage .mosim-business-info *{text-transform:none!important;overflow-wrap:anywhere;word-break:normal;line-height:1.8}
html body #mosimPage>nav{border:0!important}
html body #mosimPage footer .footer-grid{gap:20px;align-items:start}
html body #mosimPage footer .footer-links{line-height:1.8;gap:8px;align-items:center}
@media(max-width:760px){  html body{--mosim-mobile-control-height:36px;--mosim-mobile-control-width:112px;--mosim-mobile-control-font:10px}
  /* Mobile navigation stays in document flow so it cannot cover country selection. */
  html body #mosimPage>nav{position:relative!important;top:auto!important;transform:none!important;background:#fafaf8!important}
  html body #mosimPage>nav>.container.nav-inner{min-height:0!important;height:auto!important;padding:16px!important}
  html body #mosimPage>nav .mobile-brand-row{min-height:0!important;margin-bottom:16px!important;align-items:center!important}
  /* Keep the mobile language list in flow: never cover actions or page copy. */
  html body #mosimPage>nav .mobile-brand-row:has(.lang-switcher-side[open]){align-items:flex-start!important}
  html body #mosimPage>nav .mobile-brand-row .lang-switcher-side{position:relative!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;flex:0 0 var(--mosim-mobile-control-width);width:var(--mosim-mobile-control-width)!important}
  html body #mosimPage>nav .lang-switcher-side .lang-menu{position:static!important;box-sizing:border-box;width:100%;max-height:240px;max-height:min(240px,40dvh);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  html body #mosimPage>nav .lang-switcher-side .lang-menu label{white-space:normal;overflow-wrap:anywhere;line-height:1.5}
  html body #mosimPage>nav .mobile-quick-actions{grid-template-columns:repeat(auto-fit,minmax(90px,1fr))!important}
  html body #mosimPage>nav :is(.mobile-login,.mobile-my-mosim,.mobile-membership-apply,.mobile-ai-check){box-sizing:border-box;font-size:var(--mosim-mobile-control-font)!important;letter-spacing:0!important;height:var(--mosim-mobile-control-height)!important;min-height:var(--mosim-mobile-control-height)!important;padding:0 8px!important;align-items:center!important;justify-content:center!important;white-space:normal!important;line-height:1.4!important}
  html body #mosimPage #mosimMarket{clear:both;margin-top:0!important}
  html body #mosimPage #mosimServiceCountry{box-sizing:border-box;min-height:var(--mosim-mobile-control-height)!important;height:var(--mosim-mobile-control-height)!important;min-width:0;width:var(--mosim-mobile-control-width);padding:0 30px 0 12px!important;font-size:var(--mosim-mobile-control-font)!important;line-height:1.3!important;background-position:right 11px center;background-size:12px 12px}
  html body #mosimPage .mosim-market-control label{font-size:13px}
  html body #mosimPage #mosimMarketNote{word-break:keep-all;overflow-wrap:anywhere;line-height:1.75}
  html body #mosimPage footer .footer-grid{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:16px!important}
  html body #mosimPage footer .footer-links{justify-content:flex-start!important;text-align:start!important;flex-wrap:wrap!important}
  html body #mosimPage footer small{display:block!important;white-space:normal!important;line-height:1.7!important;overflow-wrap:anywhere}
  html body #mosimPage .mosim-business-info{margin-top:22px!important;padding-inline-end:56px;line-height:1.8!important;text-align:start}
}

/* Thailand landing shares the established web geometry and colors. */
html body #mosimThailand[hidden]{display:none!important}
.mosim-thailand{padding-block:8px 24px;max-width:1040px;margin-left:max(4vw,calc((100% - 1500px)/2));margin-right:auto;text-align:left}
.mosim-thailand-hero{padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;margin-bottom:16px;text-align:left}
.mosim-thailand-hero small{color:#5f686e;font-size:12px;line-height:1.6;letter-spacing:0}
.mosim-thailand-hero h1{font-size:clamp(22px,2.5vw,32px);line-height:1.4;margin:6px 0}
.mosim-thailand-hero p,.mosim-thailand-note{font-size:14px;line-height:1.65;overflow-wrap:break-word;word-break:normal;letter-spacing:0;margin:8px 0 0;text-align:start}
.mosim-thailand-services{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:stretch}
.mosim-thailand-card{padding:14px 16px;background:#fff;border:0;border-radius:18px;min-width:0}
.mosim-thailand-card h2{font-size:17px;line-height:1.5;margin:0 0 6px}
.mosim-thailand-card p{font-size:14px;line-height:1.7;margin:0;overflow-wrap:anywhere}
.mosim-thailand-note{color:#666b68;font-size:13px;margin-top:20px}
html body #mosimChatRoot:not([data-open="true"]){right:16px!important;left:auto!important;width:56px!important;height:56px!important;inline-size:56px!important;block-size:56px!important;min-width:56px!important;max-width:56px!important;min-height:56px!important;max-height:56px!important}
html body #mosimChatRoot:not([data-open="true"]) .mosim-chat-launcher{width:56px!important;height:56px!important;inline-size:56px!important;block-size:56px!important;min-width:56px!important;max-width:56px!important;min-height:56px!important;max-height:56px!important;border-radius:14px!important}
html body #mosimChatRoot .mosim-chat-launcher-mark{font-size:24px!important}
.mosim-hospital-categories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:24px 0}
.mosim-hospital-category{background:#fff;border:0;border-radius:18px;padding:20px;line-height:1.6;min-width:0;overflow-wrap:anywhere}
.mosim-hospital-category strong,.mosim-hospital-category span{display:block}
.mosim-hospital-category span{font-size:13px;color:#666b68;margin-top:6px}
@media(max-width:760px){.mosim-thailand-hero{padding:0}.mosim-thailand-services{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mosim-thailand-card{padding:12px 14px}.mosim-thailand-card h2{font-size:17px}.mosim-hospital-categories{grid-template-columns:repeat(2,minmax(0,1fr))}}

body:is(.mosim-account-active,.mosim-ai-active) #mosimThailand{display:none!important}

/* One region selector; language changes preserve the selected destination. */
.mosim-thailand-regions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}
html body #mosimPage .mosim-thailand-regions button{min-height:44px;padding:10px 12px;background:#5f686e;color:#fff;font-size:14px;border:0;border-radius:18px}
html body #mosimPage .mosim-thailand-regions button[aria-pressed="true"]{background:#394146;color:#fff}
.mosim-thailand-region-title{font-size:18px;line-height:1.5;margin:12px 0}
@media(max-width:760px){.mosim-thailand-regions{grid-template-columns:repeat(2,minmax(0,1fr))}}

@media(min-width:761px) and (max-width:1000px){.mosim-thailand-services{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Mobile launcher only: retain a small edge gap without changing desktop positioning. */
@media(max-width:760px){html body #mosimChatRoot:not([data-open="true"]){right:8px!important}}

@media(max-width:390px){html body{--mosim-mobile-control-height:34px;--mosim-mobile-control-width:106px}}
