/* Shared phone and tablet layouts. Desktop styling stays in each view's stylesheet. */
.studio-section-nav,.mges-mobile-poster,.mges-section-nav,.studio-mobile-poster{display:none}
.mges-page,.mges-dialog{box-sizing:border-box}
/* The WordPress shortcode block can insert empty paragraph/link wrappers. */
.mges-events-rail>p:has(>a:empty),.mges-event-tile>p:empty{display:none}
@media(max-width:960px){
  .studio-content-grid{grid-template-columns:minmax(0,1fr)}
  .studio-sidebar{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;position:static!important}
  .studio-poster-card{grid-column:1/-1;max-width:420px;width:100%;justify-self:center}
  .studio-dialog .mges-field-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  .studio-page,.mges-active{overflow-x:clip}
  .studio-page{--muted:#686873}
  .studio-page,.mges-page{overflow-wrap:anywhere}
  .studio-top>div{padding:16px 18px;min-height:60px}
  .studio-top small:before{display:none}
  .studio-toolbar{position:sticky;top:0;z-index:25;background:#f5f5f7f5;backdrop-filter:blur(16px)}
  .studio-toolbar>div{padding:10px 14px;gap:8px;flex-wrap:nowrap}
  .studio-toolbar strong{font-size:12px;gap:6px}
  .studio-toolbar strong>span{display:none}
  .studio-view-toggle{flex-shrink:0}
  .studio-view-toggle button{min-height:44px;padding:10px 12px;font-size:12px;white-space:nowrap}
  .studio-main{padding:16px 12px calc(112px + env(safe-area-inset-bottom));max-width:640px}
  .studio-notice{padding:12px 14px;margin-bottom:14px;font-size:12px;line-height:1.6;border-radius:14px}
  .studio-section-nav{display:flex;position:sticky;top:66px;z-index:24;align-items:center;gap:12px;margin:0 0 16px;padding:8px 6px;background:#f5f5f7}
  .studio-section-nav label{font-size:12px;color:#61616b;white-space:nowrap}
  .studio-section-nav select{margin:0;min-height:44px;background:#fff;font-size:16px;padding:8px 12px;min-width:0}
  .studio-card,.mges-card{padding:22px 20px;border-radius:20px;margin-bottom:14px}
  .studio-card>header{flex-wrap:wrap;gap:6px;margin-bottom:16px}
  .studio-card h2,.mges-page h2{font-size:26px;line-height:1.18;letter-spacing:-.035em}
  .studio-hint{font-size:11px;white-space:normal;color:#777781}
  .studio-page section[id]{scroll-margin-top:140px}
  .mges-page section[id]{scroll-margin-top:24px}
  .studio-hero{display:flex;flex-direction:column;gap:22px;align-items:stretch}
  .studio-conference,.mges-conference{font-size:10px;letter-spacing:.08em;line-height:1.5;display:inline-block}
  .studio-hero h1{margin:16px 0 8px!important}
  .studio-page textarea.studio-title{font-size:clamp(30px,8vw,40px)!important;line-height:1.12!important;min-height:0!important;padding:0 0 8px!important}
  .studio-page .studio-subtitle{font-size:17px!important;min-height:44px!important;white-space:normal}
  .studio-meta{gap:4px;margin:16px 0}
  .studio-meta>button{min-height:48px;padding:8px 0;color:#5f5f69;font-size:14px;align-items:flex-start}
  .studio-meta>button>span{padding:0 0 6px}
  .studio-meta svg{width:18px;height:18px;margin-top:2px}
  .studio-hero-actions{gap:10px;margin-top:14px}
  .studio-hero-actions .mges-button{flex:1;min-height:48px;padding:12px;font-size:13px}
  .studio-edit-link{min-width:64px;min-height:44px;font-size:12px!important;text-decoration:underline;text-underline-offset:3px}
  .studio-media-tile{border-radius:16px;aspect-ratio:16/9}
  .studio-media-change{right:10px;bottom:10px;padding:10px 12px;font-size:12px}
  .studio-media-empty strong{text-transform:none;font-size:15px;max-width:220px;text-align:center}
  .studio-media-empty small{font-size:12px;text-align:center}
  .studio-video-prompt{font-size:12px!important;min-height:48px;line-height:1.5;padding:12px 14px}
  .studio-partners header{flex-wrap:nowrap}
  .studio-partners .studio-section-input{font-size:18px!important;min-width:0;min-height:44px!important}
  .studio-logo-rail,.mges-logo-row{gap:10px;scroll-padding-inline:0;overscroll-behavior-x:contain}
  .studio-logo,.studio-add-logo{flex-basis:140px;height:100px;padding:14px}
  .studio-add-logo{font-size:13px!important;gap:8px}
  .studio-featured-tag{font-size:10px;padding:5px 8px}
  .studio-sponsorship{padding:22px 20px;border-radius:20px;margin:14px 0}
  .studio-sponsor-heading{flex-wrap:wrap;gap:16px}
  .studio-sponsor-heading h2{font-size:22px}
  .studio-sponsor-heading p{font-size:13px;line-height:1.6}
  .studio-yes-no{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .studio-yes-no label{text-align:center}
  .studio-yes-no span{padding:13px 16px;font-size:12px;min-height:44px}
  .studio-deck-upload{gap:10px;padding:16px;margin-top:16px}
  .studio-deck-upload>svg{flex:none}
  .studio-deck-upload>span{flex:1;min-width:0}
  .studio-deck-upload strong{font-size:14px;line-height:1.4}
  .studio-deck-upload small{font-size:12px}
  .studio-deck-upload>b{max-width:100%;font-size:11px;padding:8px 12px;margin:2px 0 0 30px;overflow-wrap:anywhere}
  .studio-introduction{font-size:12px!important;line-height:1.65;gap:12px;padding:8px 0}
  .studio-introduction input{width:20px;height:20px;flex:none}
  .studio-content-grid{display:flex;gap:4px}
  .studio-richtext{font-size:16px;line-height:1.75;color:#51515b}
  .studio-page .studio-inline:not(.studio-title){font-size:16px!important;line-height:1.65!important}
  .studio-page textarea.studio-inline:not(.studio-title){resize:none;overflow:hidden;min-height:96px!important}
  .studio-page .mges-category-choices{max-height:none;overflow:visible;gap:8px}
  .studio-page .mges-category-choices legend{font-size:14px}
  .studio-page .mges-category-choices span{min-height:44px;padding:11px 13px;font-size:12px;display:flex;align-items:center}
  .studio-gallery{display:grid;grid-template-columns:1fr;gap:10px;aspect-ratio:auto}
  .studio-four-photos{aspect-ratio:1.6;gap:10px}
  .studio-photo{border-radius:12px}
  .studio-photo-label{font-size:12px!important;padding:8px}
  .studio-section-description{font-size:14px!important;line-height:1.6}
  .studio-coverage{font-size:13px!important;padding:16px!important;line-height:1.6}
  .studio-coverage strong{font-size:14px!important}
  .studio-sidebar{display:flex;flex-direction:column;gap:24px;padding-top:14px}
  .studio-sidebar>section{width:100%;min-width:0}
  .studio-sidebar .mges-offer{padding:30px 24px 24px;border-radius:20px}
  .studio-sidebar .mges-offer h2{font-size:15px}
  .studio-sidebar .mges-price del{font-size:54px}
  .studio-sidebar .mges-price strong{font-size:42px}
  .studio-sidebar .mges-offer>p,.studio-sidebar .mges-offer li{font-size:14px;line-height:1.6}
  .studio-sidebar .mges-offer li{padding-top:14px;padding-bottom:14px}
  .studio-sidebar .mges-button{min-height:48px;font-size:14px}
  .studio-sidebar .mges-telegram-card{padding:22px 20px;border-radius:20px}
  .studio-sidebar .mges-telegram-card h2{font-size:12px;letter-spacing:.06em}
  .studio-telegram-header strong{font-size:15px}
  .studio-telegram-header a{font-size:13px;min-height:30px;padding-top:4px}
  .studio-message-copy{font-size:14px;padding:18px 16px;line-height:1.7}
  .studio-message-copy>strong{font-size:16px}
  .studio-handle-line{gap:8px}
  .studio-handle-line .studio-inline{max-width:none;flex:1;min-width:110px;min-height:44px!important}
  .studio-handle-line [data-live-handle]{width:44px;min-height:44px;display:grid;place-items:center;border:1px solid #d5e6f2;border-radius:12px;flex:none}
  .studio-promotion-image{aspect-ratio:1;object-fit:contain;background:white}
  .studio-message-copy>a{display:inline-flex;align-items:center;min-height:44px;font-weight:600}
  .studio-poster-card{padding:20px;max-width:none}
  .studio-poster-card .studio-meta>p{font-size:14px;color:#5f5f69;line-height:1.6}
  .studio-event-poster{border-radius:12px}
  .studio-bottom-offer{padding:20px 8px;gap:18px;margin-top:8px}
  .studio-bottom-offer h2{font-size:30px;line-height:1.15}
  .studio-bottom-offer p{font-size:15px;color:#686873}
  .studio-bottom-offer .mges-button{width:100%;min-height:48px}
  .studio-bottom-offer strong{display:block;margin:16px 0;font-size:24px}
  .studio-footer{padding:24px 8px;flex-wrap:wrap}
  .studio-footer span{font-size:12px}
  .studio-review-bar{padding:10px 12px calc(10px + env(safe-area-inset-bottom));display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:8px}
  .studio-review-bar>div{grid-column:1/-1;display:block;width:100%}
  .studio-review-bar strong{font-size:12px;color:#5f5f69}
  .studio-review-bar small{display:none}
  .studio-review-bar .mges-button{font-size:13px;min-height:48px;padding:12px 10px;white-space:normal}
  .studio-preview-mode .studio-section-nav{display:none}
  .studio-preview-mode .studio-mobile-poster{display:block;order:-1;width:100%;aspect-ratio:1;background:#fff;border-radius:12px;overflow:hidden}
  .studio-mobile-poster img{width:100%;height:100%;object-fit:contain}
  .studio-preview-mode .studio-poster-card{display:none}
  .studio-preview-mode .studio-hero-art:has(.studio-media-tile:not(.has-media)){display:none}
  .studio-preview-mode .studio-partners:not(:has(.studio-logo)){display:none}
  .studio-preview-mode .studio-meta>button{min-height:36px;border:0}
  .studio-preview-mode .studio-meta>button>span{border:0}
  .studio-preview-mode .studio-hint{display:none}
  /* Editors become bottom sheets with readable inputs and a reachable close target. */
  .studio-dialog,.studio-page .mges-service-dialog,.mges-dialog{position:fixed;inset:auto 0 0;width:100%;max-width:none;max-height:calc(100dvh - 20px);margin:0;border:0;border-radius:24px 24px 0 0;padding:58px 20px calc(24px + env(safe-area-inset-bottom));overscroll-behavior:contain;scroll-padding-block:20px}
  .studio-dialog-close,.mges-service-close,.mges-close{position:absolute;top:8px;right:12px;width:44px;height:44px;display:grid;place-items:center;padding:0;background:transparent;border:0;border-radius:0;font-size:0!important}
  .studio-dialog label,.mges-dialog label{font-size:14px!important;line-height:1.5}
  .studio-dialog input:not([type=checkbox]):not([type=radio]):not([type=file]),.studio-dialog select,.studio-dialog textarea,.mges-dialog input,.mges-service-dialog input{font-size:16px!important;min-height:48px;min-width:0;max-width:100%}
  .studio-dialog .mges-field-grid{gap:18px}
  .studio-dialog .mges-partner-row{grid-template-columns:1fr;padding:16px;margin:12px 0;min-width:0}
  .studio-dialog .mges-partner-row input[type=file]{width:100%;font-size:13px}
  .studio-dialog .mges-button,.studio-dialog .mges-small-button,.mges-dialog .mges-button{min-height:48px;font-size:14px}
  .studio-dialog .studio-upload-box{padding:18px 16px}
  .studio-dropzone{min-height:150px}
  .studio-dropzone strong{font-size:16px}
  .studio-dropzone small{font-size:12px}
  .studio-video-offer,.mges-announcement-offer{grid-template-columns:1fr;padding:22px 18px;gap:12px}
  .studio-video-offer>strong,.mges-announcement-offer>strong{margin:0;font-size:40px}
  .studio-video-offer h2,.mges-announcement-offer h2{font-size:28px}
  .studio-video-offer p,.mges-announcement-offer p{font-size:14px;margin:8px 0 0}
  .studio-page .mges-sample-row{gap:10px}
  .studio-page .mges-sample-row span{font-size:10px;padding:6px;left:5px;bottom:5px}
  .studio-remove{font-size:13px!important;min-height:44px}
  .studio-page:has(dialog[open]),body:has(.mges-dialog[open]){overflow:hidden}
  /* Public event: artwork first, full-width story, and persistent attendee actions. */
  .mges-page{padding:0 12px;max-width:640px;margin:auto;font-size:16px}
  .mges-active main.wp-block-group:has(.mges-page){padding-left:0!important;padding-right:0!important;padding-top:12px!important}
  .mges-active main .wp-block-group:has(.mges-page),.mges-active .wp-block-post-content:has(>.mges-page){padding-left:0!important;padding-right:0!important;margin-left:0!important;margin-right:0!important}
  .mges-active .wp-block-post-content>.mges-page{width:100%!important;max-width:640px!important;margin-left:auto!important;margin-right:auto!important}
  .mges-active .wp-site-blocks>.wp-block-group:has(>.mges-page){padding-left:0!important;padding-right:0!important}
  .mges-back{font-size:13px;line-height:1.5;margin:0 4px 16px;min-height:44px;display:flex;align-items:center}
  .mges-hero{display:flex;flex-direction:column;gap:22px;align-items:stretch;padding:20px}
  .mges-mobile-poster{display:block;order:-1;aspect-ratio:1;width:100%;background:#fff;border-radius:12px;overflow:hidden}
  .mges-mobile-poster img{display:block;width:100%;height:100%;object-fit:contain}
  .mges-hero h1{font-size:clamp(30px,8vw,40px);line-height:1.12;margin:14px 0;overflow-wrap:anywhere}
  .mges-subtitle{font-size:18px;line-height:1.5;margin-bottom:18px}
  .mges-details{margin:18px 0 0;gap:12px}
  .mges-details p{font-size:14px;line-height:1.6;color:#5e5e69}
  .mges-hero-media{width:100%}
  .mges-hero-media:empty{display:none}
  .mges-media{border-radius:14px}
  .mges-section-nav{display:flex;gap:8px;overflow-x:auto;padding:2px 0 14px;margin-bottom:4px;scrollbar-width:thin}
  .mges-section-nav a{flex:none;display:flex;align-items:center;min-height:44px;padding:10px 15px;background:white;border:1px solid #e5e5eb;border-radius:99px;font-size:13px;font-weight:600}
  .mges-copy{font-size:16px;line-height:1.8}
  .mges-page h2{margin-bottom:18px}
  .mges-list li{font-size:15px;line-height:1.7;padding-block:13px}
  .mges-photo-grid,.mges-gallery-single .mges-photo-grid{aspect-ratio:1.6;gap:10px}
  .mges-photo-grid a{border-radius:12px}
  .mges-logo{flex-basis:136px;height:104px}
  .mges-logo img{max-width:100%}
  .mges-section-heading h2{font-size:28px}
  .mges-section-heading a{font-size:14px;line-height:1.6}
  .mges-events-rail{grid-auto-columns:78%;gap:14px}
  .mges-event-tile h3{font-size:16px}
  .mges-event-tile p{font-size:14px}
  .mges-more-actions{display:grid;grid-template-columns:1fr;margin:20px 0}
  .mges-more-actions .mges-button{font-size:14px!important;min-height:48px}
  .mges-community .mges-button,.mges-services .mges-button{width:100%;min-height:48px;font-size:14px!important}
  .mges-mobile-actions{padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
  .mges-mobile-actions .mges-actions{display:flex;gap:8px;align-items:stretch}
  .mges-mobile-actions .mges-button{flex:1;min-width:0;min-height:52px;font-size:12px!important;line-height:1.4;padding:10px 8px;gap:6px;text-align:center}
  .mges-mobile-actions .mges-button>svg{display:none}
  .mges-mobile-actions .mges-share{width:44px;min-height:52px;height:auto;flex:none;border-radius:14px}
  .mges-active{padding-bottom:calc(94px + env(safe-area-inset-bottom))!important}
  .mges-dialog form{gap:18px}
  .mges-dialog h2{font-size:28px;margin-top:0}
  .mges-dialog p{font-size:14px;line-height:1.7}
  .mges-active #mg-coverage-modal,.mges-active #mg-claim-modal{padding:0!important;align-items:flex-end!important}
  .mges-active #mg-coverage-modal .mg-ev-modal-card,.mges-active #mg-claim-modal .mgc-card{box-sizing:border-box;max-width:none;width:100%;max-height:calc(100dvh - 20px);padding:58px 20px calc(24px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;overscroll-behavior:contain}
  .mges-active #mg-coverage-modal input,.mges-active #mg-coverage-modal textarea,.mges-active #mg-claim-modal input,.mges-active #mg-claim-modal textarea{box-sizing:border-box;font-size:16px!important;max-width:100%;min-width:0}
  .mges-active #mg-coverage-modal .mg-ev-modal-close,.mges-active #mg-claim-modal .mgc-close{top:10px;right:12px;width:44px;height:44px}
}
@media(prefers-reduced-motion:reduce){.studio-page *,.mges-page *{scroll-behavior:auto!important}}
