.mc-toolbar,.mc-exact-add,.mc-mobile-empty{display:none}
.mc-picker:not([open]){display:none}
.mc-picker{padding:0;border:1px solid #cddcf0;border-radius:16px;background:#f7f8fb;color:#17273a;width:min(440px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(90vh - var(--tg-safe-top,0px));max-height:calc(90dvh - var(--tg-safe-top,0px));box-sizing:border-box;overflow:hidden;box-shadow:0 16px 70px #10234444}
.mc-picker[open]{display:flex;flex-direction:column}
.mc-picker::backdrop{background:#10234488}
.mc-picker-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px;background:#fff;border-bottom:1px solid #dce5f1}
.mc-picker-head strong{font-size:18px}.mc-picker-head p{font-size:13px;line-height:1.4;color:#61748e;margin:5px 0 0}
.mc-close{flex:none;width:44px;height:44px;border:1px solid #cddcf0;border-radius:9px;background:white;color:#334b65;font-size:26px;cursor:pointer}
html.mc-picker-open{overflow:hidden}
.mc-just-added{outline:3px solid #1a6ed4;outline-offset:2px}
.mc-picker-head,.mc-add-button{user-select:none;-webkit-user-select:none}
.mc-picker,.mc-add-button{-webkit-tap-highlight-color:transparent}
.mc-insert-before{outline:0!important;box-shadow:0 -5px 0 #1a6ed4!important}
.mc-insert-after{outline:0!important;box-shadow:0 5px 0 #1a6ed4!important}
@media(max-width:900px){
  body[data-i18n-page="constructor"] .wrap{padding:0 10px}
  body[data-i18n-page="constructor"] .card{padding:16px 12px;min-width:0;box-sizing:border-box}
  #builder-shell.mc-mobile,:is(#bb-builder-shell,#bbpm-builder-shell).mc-mobile,#sport-hockey .hk-builder.mc-mobile{display:flex;flex-direction:column;height:700px;height:min(800px,90svh);min-height:480px;max-width:100%;position:relative;box-sizing:border-box}
  .mc-mobile #workspace-wrap,.mc-mobile :is(#bb-workspace-wrap,#bbpm-workspace-wrap),#sport-hockey .mc-mobile .hk-area-wrap{width:100%;flex:1;min-height:0;min-width:0;display:flex;flex-direction:column}
  .mc-mobile .mc-toolbar{display:flex;flex-direction:column;gap:8px;padding:12px;background:#fff;border-bottom:1px solid #dce5f1;flex:none}
  .mc-add-button{width:100%;padding:12px;border:0;border-radius:8px;background:#1a6ed4;color:#fff;font:700 15px 'Segoe UI',Arial,sans-serif;min-height:44px;cursor:pointer}
  .mc-workspace-hint{font-size:12px;color:#61748e;line-height:1.45}
  .mc-mobile #topbar,.mc-mobile :is(#bb-topbar,#bbpm-topbar),#sport-hockey .mc-mobile .hk-topbar{padding:10px 12px;gap:10px;flex-wrap:wrap;flex:none}
  .mc-mobile .topbar-right,.mc-mobile .bb-topbar-right,#sport-hockey .mc-mobile .hk-topbar-right{flex-wrap:wrap;gap:8px}
  .mc-mobile #workspace,.mc-mobile :is(#bb-workspace,#bbpm-workspace),#sport-hockey .mc-mobile .hk-workspace{padding:20px 10px 44px;min-height:0;min-width:0;overflow:auto;justify-content:flex-start;overscroll-behavior:contain}
  .mc-mobile #chain,.mc-mobile :is(#bb-chain,#bbpm-chain),#sport-hockey .mc-mobile .hk-chain{min-width:0;width:max-content;align-items:flex-start;transform-origin:top left!important}
  .mc-mobile .piece,.mc-mobile .bb-piece,#sport-hockey .hk-builder.mc-mobile .hk-piece{min-width:0;width:max-content;max-width:none;padding:12px;box-sizing:border-box;flex:none}
  .mc-mobile .block-card,.mc-mobile .bb-block-card,.mc-mobile .exact-values-card,#sport-hockey .hk-builder.mc-mobile .hk-block{width:var(--mc-card-width,260px);min-width:0;max-width:none;box-sizing:border-box;flex:none}
  .mc-mobile .piece.or-slot .block-card,.mc-mobile .bb-piece.bb-or-slot .bb-block-card{width:var(--mc-card-width,260px);box-sizing:border-box;padding:10px}
  /* The touch OR target overlays the right edge instead of stretching the row
     outside the phone at 100% zoom. It exists only while a block is dragged. */
  .mc-mobile .or-strip,.mc-mobile .bb-or-strip,#sport-hockey .hk-builder.mc-mobile .hk-or-strip{position:absolute;right:8px;top:10px;bottom:10px;width:52px;margin:0;z-index:2;box-sizing:border-box;background:rgba(240,246,255,.96)}
  .mc-mobile .connector,.mc-mobile .bb-connector,#sport-hockey .mc-mobile .hk-connector{width:calc(var(--mc-card-width,260px) + 28px);max-width:none;flex:none}
  .mc-mobile #empty-hint,.mc-mobile :is(#bb-empty-hint,#bbpm-empty-hint),#sport-hockey .mc-mobile .hk-empty,.mc-mobile .add-hint,.mc-mobile .bb-add-hint,#sport-hockey .mc-mobile .hk-add-hint{width:calc(var(--mc-card-width,260px) + 28px);min-width:0;max-width:none;box-sizing:border-box;padding:24px 12px;flex:none}
  .mc-mobile :is(.phead,.bb-phead),#sport-hockey .mc-mobile .hk-piece-head{flex-wrap:wrap;position:relative;padding-right:30px;touch-action:none;user-select:none;-webkit-user-select:none}
  .mc-mobile :is(.phead .rm,.bb-phead .bb-rm),#sport-hockey .mc-mobile .hk-piece-head .hk-delete{position:absolute;right:0;top:-5px;display:flex;align-items:center;justify-content:center;min-width:30px;min-height:36px;color:#a03939}
  .mc-mobile :is(.glabel,.bb-glabel,.hk-piece-group){font-size:9px;margin-left:0}
  .mc-mobile :is(.block-card,.bb-block-card,.hk-block) :is(select,input,textarea){max-width:100%;box-sizing:border-box}
  .mc-mobile :is(.exact-values-card,.hk-block) :is(.exact-dropzone,.hk-fields){min-width:0;max-width:100%;box-sizing:border-box;overflow-x:auto}
  .mc-mobile :is(.frow,.bb-frow,.hk-fields) :is(select,input,textarea){font-size:16px}
  .mc-mobile .mc-exact-add{display:block;font-size:12px;text-align:left;color:#5b3789;margin-top:12px}
  .mc-mobile .mc-mobile-empty{display:inline}.mc-mobile .mc-desktop-empty{display:none}
  .mc-mobile .mc-exact-add select{display:block;width:100%;max-width:100%;font-size:16px;margin-top:6px}
  .mc-mobile :is(.ghost-slot,.bb-ghost-slot),#sport-hockey .mc-mobile .hk-ghost{width:calc(var(--mc-card-width,260px) + 28px)!important;min-width:0;box-sizing:border-box}
  .mc-mobile .mc-picker #sidebar,.mc-mobile .mc-picker :is(#bb-sidebar,#bbpm-sidebar),#sport-hockey .mc-mobile .mc-picker .hk-sidebar{flex:1;min-height:0;width:100%;max-height:none;box-sizing:border-box;padding:10px 14px 22px;border:0;overflow-y:auto;overscroll-behavior:contain}
  .mc-picker :is(#sidebar h1,#sidebar .sub,#sidebar .tip,:is(#bb-sidebar,#bbpm-sidebar) h1,:is(#bb-sidebar,#bbpm-sidebar) .bb-sub,:is(#bb-sidebar,#bbpm-sidebar) .bb-tip,.hk-sidebar h3,.hk-sidebar .hk-sub,.hk-sidebar .hk-tip){display:none}
  .mc-mobile .mc-picker :is(.toolbox,.bb-toolbox,.hk-tool){min-height:46px;font-size:14px;cursor:pointer;touch-action:pan-y;transform:none}
}
@media(max-width:600px){
  body[data-i18n-page="constructor"] :is(#telegram_settings,.telegram-settings,.hk-telegram-settings) .row>div{flex:1 0 100%;min-width:0}
}
