.mtl-shell *{box-sizing:border-box}.mtl-shell{margin:0;background:#0b0d12;color:#eef1f6;font-family:Inter,system-ui,-apple-system,sans-serif}.mtl-shell a{color:inherit}.mtl-shell header{position:sticky;top:0;z-index:20;display:flex;justify-content:space-between;gap:20px;padding:16px max(20px,4vw);background:#0b0d12e8;backdrop-filter:blur(14px);border-bottom:1px solid #ffffff12}.mtl-shell header nav{display:flex;gap:16px;align-items:center}.mtl-shell .landing,.mtl-shell .admin-mtl,.mtl-shell .auth-grid,.mtl-shell main{max-width:1180px;margin:auto}.mtl-shell .landing,.mtl-shell .admin-mtl{padding:60px 22px}.mtl-shell .timeline-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.mtl-shell .tl-tile,.mtl-shell .timeline-editor,.mtl-shell .admin-mtl section,.mtl-shell .auth-grid form{background:#131722;border:1px solid #ffffff16;border-radius:18px;padding:22px;text-decoration:none}.mtl-shell .tl-tile span,.mtl-shell .tl-tile p,.mtl-shell small{color:#9da8ba}.mtl-shell .tl-hero{text-align:center;padding:70px 20px 35px}.mtl-shell .tl-hero h1{font-size:clamp(32px,6vw,68px);margin:.15em 0}.mtl-shell .eyebrow{letter-spacing:.2em;color:#8aa4ff;font-size:12px}.mtl-shell .range,.mtl-shell .hint{color:#9da8ba}.mtl-shell .range{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}.mtl-shell .timeline-stage{height:var(--timeline-height);position:relative;margin:30px 20px 100px;cursor:crosshair}.mtl-shell .axis{position:absolute;left:50%;top:0;bottom:0;width:2px;background:linear-gradient(#6e8cff,#ffffff55,#6e8cff);box-shadow:0 0 24px #6688ff55}.mtl-shell .event-card{position:absolute;width:calc(50% - 34px);animation:rise .5s ease both}.mtl-shell .event-card.left{left:0;text-align:right}.mtl-shell .event-card.right{right:0}.mtl-shell .event-card:after{content:"";position:absolute;top:28px;width:12px;height:12px;border-radius:50%;background:#fff;box-shadow:0 0 0 6px #6e8cff55}.mtl-shell .event-card.left:after{right:-40px}.mtl-shell .event-card.right:after{left:-40px}.mtl-shell .event-open{width:min(440px,100%);border:1px solid #ffffff18;background:#151a26;color:#fff;border-radius:18px;padding:18px;text-align:inherit;cursor:pointer;box-shadow:0 14px 40px #0005;transition:.2s}.mtl-shell .left .event-open{margin-left:auto}.mtl-shell .event-open:hover{transform:translateY(-4px);border-color:#7890ff}.mtl-shell .event-open time{display:block;color:#8ea5ff;font:12px ui-monospace,monospace}.mtl-shell .event-open strong{display:block;font-size:19px;margin:7px 0}.mtl-shell .event-open span{color:#aab3c2}.mtl-shell dialog{width:min(900px,calc(100% - 24px));max-height:90vh;overflow:auto;border:1px solid #ffffff22;border-radius:22px;background:#111620;color:#fff;padding:30px;box-shadow:0 30px 100px #000b}.mtl-shell dialog::backdrop{background:#02040ad9;backdrop-filter:blur(6px)}.mtl-shell .dialog-x{position:sticky;float:right;top:0;border:0;border-radius:50%;width:40px;height:40px;font-size:24px}.mtl-shell .detail-image,.mtl-shell dialog video{max-width:100%;max-height:72vh;border-radius:14px}.mtl-shell .media-grid{display:grid;gap:14px;margin-top:24px}.mtl-shell .file-link{display:block;padding:14px;background:#ffffff0b;border-radius:12px}.mtl-shell .body{line-height:1.75}.mtl-shell .lead{color:#aeb8c8;font-size:18px}.mtl-shell label{display:grid;gap:7px;margin:14px 0;color:#bac3d1}.mtl-shell input,.mtl-shell textarea,.mtl-shell select{width:100%;padding:12px;border-radius:10px;border:1px solid #ffffff22;background:#0b0f17;color:#fff}.mtl-shell button{padding:11px 16px;border:0;border-radius:10px;background:#6e87ff;color:white;font-weight:700;cursor:pointer}.mtl-shell .danger{background:#a93846}.mtl-shell .form-actions,.mtl-shell .two{display:flex;gap:12px}.mtl-shell .two>*{flex:1}.mtl-shell .auth-grid{padding:70px 20px;display:grid;grid-template-columns:1fr 1fr;gap:20px}.mtl-shell .error{background:#6d2630;padding:12px;border-radius:10px}.mtl-shell .success{background:#245f42;padding:12px;border-radius:10px}.mtl-shell .admin-row{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 0;border-bottom:1px solid #ffffff12}.mtl-shell .admin-row small{display:block}.mtl-shell .inline{display:inline-flex;gap:8px}.mtl-shell .admin-mtl section{margin-top:22px}@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}@media (max-width:720px){.mtl-shell header{font-size:14px}.mtl-shell .timeline-stage{margin-left:14px;margin-right:14px}.mtl-shell .axis{left:18px}.mtl-shell .event-card,.mtl-shell .event-card.left,.mtl-shell .event-card.right{left:48px;right:auto;width:calc(100% - 48px);text-align:left}.mtl-shell .event-card.left:after,.mtl-shell .event-card.right:after{left:-36px;right:auto}.mtl-shell .event-open,.mtl-shell .left .event-open{margin:0;width:100%}.mtl-shell .auth-grid{grid-template-columns:1fr}.mtl-shell .two{display:grid}.mtl-shell .admin-row{align-items:flex-start;flex-direction:column}.mtl-shell .tl-hero{padding-top:45px}}
/* v2 interactive chronological axis */
.mtl-shell .timeline-stage{--axis-color:#ff3131;max-width:1120px;margin-left:auto;margin-right:auto;padding:0 18px}.mtl-shell .axis{width:6px;margin-left:-3px;background:linear-gradient(180deg,#ff3131,#ff5a5a 50%,#ff3131);border-radius:999px;box-shadow:0 0 18px #ff313144;cursor:crosshair}.mtl-shell .axis:after{content:"";position:absolute;left:50%;bottom:-17px;width:22px;height:22px;border-right:6px solid var(--axis-color);border-bottom:6px solid var(--axis-color);transform:translateX(-50%) rotate(45deg)}.mtl-shell .axis-hover{position:absolute;left:18px;z-index:8;min-width:190px;padding:9px 12px;border:1px solid #ffffff25;border-radius:10px;background:#090c12ee;box-shadow:0 10px 30px #0008;opacity:0;pointer-events:none;transform:translateY(-50%) translateX(8px);transition:opacity .12s,transform .12s}.mtl-shell .axis-hover.show{opacity:1;transform:translateY(-50%) translateX(0)}.mtl-shell .axis-hover strong{display:block;white-space:nowrap;font:700 13px ui-monospace,SFMono-Regular,monospace}.mtl-shell .axis-hover span{display:block;margin-top:3px;color:#9da8ba;font-size:11px}.mtl-shell .event-card{--author-color:#8aa4ff}.mtl-shell .event-card:before{content:"";position:absolute;top:31px;height:3px;width:34px;background:var(--author-color);opacity:.95}.mtl-shell .event-card.left:before{right:-34px}.mtl-shell .event-card.right:before{left:-34px}.mtl-shell .event-card:after{background:var(--author-color);box-shadow:0 0 0 5px #0b0d12,0 0 0 8px var(--author-color);width:10px;height:10px;top:27px}.mtl-shell .event-open{border:2px solid color-mix(in srgb,var(--author-color) 68%,transparent);position:relative;overflow:hidden}.mtl-shell .event-open:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:var(--author-color)}.mtl-shell .event-card.left .event-open:before{left:auto;right:0}.mtl-shell .event-open:hover{border-color:var(--author-color);box-shadow:0 16px 44px #0007,0 0 0 1px var(--author-color)}.mtl-shell .event-author{display:flex!important;align-items:center;gap:7px;margin-bottom:7px;color:var(--author-color)!important;font-size:12px!important;font-weight:800}.mtl-shell .event-card.left .event-author{justify-content:flex-end}.mtl-shell .event-author i{width:9px;height:9px;border-radius:50%;background:var(--author-color);box-shadow:0 0 10px var(--author-color)}.mtl-shell .event-open time{color:var(--author-color)}.mtl-shell .event-summary{display:-webkit-box!important;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.mtl-shell .event-open strong{overflow-wrap:anywhere}
@media (max-width:720px){.mtl-shell .timeline-stage{padding:0}.mtl-shell .axis{left:18px;margin-left:0}.mtl-shell .axis-hover{left:18px;min-width:170px}.mtl-shell .event-card:before{width:30px}.mtl-shell .event-card.left:before,.mtl-shell .event-card.right:before{left:-30px;right:auto}.mtl-shell .event-card.left .event-author{justify-content:flex-start}.mtl-shell .event-card.left .event-open:before{left:0;right:auto}}
/* v4 compact collaborative media editor */
.mtl-shell{font-size:14px}.mtl-shell .landing,.mtl-shell .admin-mtl,.mtl-shell .auth-grid,.mtl-shell main{max-width:1040px}.mtl-shell .tl-hero{padding:46px 18px 24px}.mtl-shell .tl-hero h1{font-size:clamp(28px,4.6vw,54px)}.mtl-shell header{padding:12px max(18px,3vw)}.mtl-shell .timeline-stage{max-width:980px;margin-top:20px}.mtl-shell .event-open{width:min(380px,100%);padding:14px;border-radius:14px}.mtl-shell .event-open strong{font-size:17px}.mtl-shell .event-thumb{display:block;height:118px;margin:-14px -14px 12px;position:relative;overflow:hidden;border-radius:12px 12px 0 0;background:#05070a}.mtl-shell .event-thumb img,.mtl-shell .event-thumb video{width:100%;height:100%;object-fit:cover;display:block}.mtl-shell .event-thumb b{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#0009;color:#fff}.mtl-shell dialog{width:min(780px,calc(100% - 28px));padding:24px;background:rgba(17,22,32,.82);backdrop-filter:blur(18px) saturate(135%);-webkit-backdrop-filter:blur(18px) saturate(135%);border:1px solid #ffffff30}.mtl-shell dialog::backdrop{background:rgba(2,4,10,.66);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.mtl-shell #event-dialog[open],.mtl-shell #edit-dialog[open]{animation:modalIn .2s ease}.mtl-shell .upload-sections{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.mtl-shell .upload-box{padding:12px;border:1px solid #ffffff18;border-radius:12px;background:#ffffff08}.mtl-shell .upload-box strong,.mtl-shell .upload-box small{display:block}.mtl-shell .upload-box input{margin-top:8px}.mtl-shell .detail-section{margin-top:22px}.mtl-shell .detail-section h3{font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:#9dacbf}.mtl-shell .detail-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.mtl-shell .lightbox-open{padding:0;background:none;overflow:hidden;border-radius:10px;aspect-ratio:4/3}.mtl-shell .lightbox-open img{width:100%;height:100%;object-fit:cover}.mtl-shell .video-list{display:grid;gap:10px}.mtl-shell .video-list video{width:100%;max-height:430px;background:#000}.mtl-shell .rich-body img{max-width:100%;height:auto;border-radius:10px;cursor:zoom-in}.mtl-shell .og-card{display:flex;gap:12px;margin:10px 0;padding:10px;border:1px solid #ffffff18;border-radius:12px;background:#ffffff08;text-decoration:none}.mtl-shell .og-card>img{width:112px;height:82px;object-fit:cover;border-radius:8px;flex:none}.mtl-shell .og-card span{min-width:0;display:grid;gap:4px}.mtl-shell .og-card b,.mtl-shell .og-card em,.mtl-shell .og-card small{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.mtl-shell .og-card b{-webkit-line-clamp:2}.mtl-shell .og-card em{-webkit-line-clamp:2;font-style:normal;color:#aeb8c8;font-size:12px}.mtl-shell .og-card small{color:#7f8b9d}.mtl-shell #mtl-lightbox{position:fixed;inset:0;z-index:9999;display:none;place-items:center;padding:24px;background:#02040ae8;backdrop-filter:blur(10px)}.mtl-shell #mtl-lightbox.show{display:grid}.mtl-shell #mtl-lightbox img{max-width:94vw;max-height:90vh;object-fit:contain;border-radius:12px}.mtl-shell #mtl-lightbox button{position:absolute;right:22px;top:18px;width:42px;height:42px;border-radius:50%;font-size:26px;background:#ffffff18}.mtl-shell .ck.ck-editor{color:#111}.mtl-shell .ck-editor__editable{min-height:220px;max-height:460px}.mtl-shell .ck-content img{max-width:100%;height:auto}@keyframes modalIn{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
@media (max-width:720px){.mtl-shell{font-size:13px}.mtl-shell .tl-hero h1{font-size:34px}.mtl-shell .upload-sections{grid-template-columns:1fr}.mtl-shell .detail-gallery{grid-template-columns:repeat(2,1fr)}.mtl-shell .og-card>img{width:88px;height:70px}.mtl-shell .event-thumb{height:105px}}

/* v5: side-aware compact timeline thumbnails */
@media (min-width:721px){
  .mtl-shell .event-open:has(.event-thumb){
    display:grid;
    grid-template-columns:96px minmax(0,1fr);
    grid-template-rows:auto auto auto auto;
    column-gap:13px;
    align-items:center;
  }
  .mtl-shell .event-open:has(.event-thumb) .event-thumb{
    width:96px;
    height:82px;
    margin:0;
    border-radius:10px;
    grid-row:1 / -1;
    align-self:center;
  }
  .mtl-shell .event-card.left .event-open:has(.event-thumb) .event-thumb{grid-column:1}
  .mtl-shell .event-card.left .event-open:has(.event-thumb) .event-author,.mtl-shell .event-card.left .event-open:has(.event-thumb) time,.mtl-shell .event-card.left .event-open:has(.event-thumb) strong,.mtl-shell .event-card.left .event-open:has(.event-thumb) .event-summary{grid-column:2}

  .mtl-shell .event-card.right .event-open:has(.event-thumb){grid-template-columns:minmax(0,1fr) 96px}
  .mtl-shell .event-card.right .event-open:has(.event-thumb) .event-thumb{grid-column:2}
  .mtl-shell .event-card.right .event-open:has(.event-thumb) .event-author,.mtl-shell .event-card.right .event-open:has(.event-thumb) time,.mtl-shell .event-card.right .event-open:has(.event-thumb) strong,.mtl-shell .event-card.right .event-open:has(.event-thumb) .event-summary{grid-column:1}

  .mtl-shell .event-open:has(.event-thumb) .event-author{grid-row:1;margin-bottom:2px}
  .mtl-shell .event-open:has(.event-thumb) time{grid-row:2}
  .mtl-shell .event-open:has(.event-thumb) strong{grid-row:3;margin:3px 0}
  .mtl-shell .event-open:has(.event-thumb) .event-summary{grid-row:4}
}

@media (max-width:720px){
  .mtl-shell .event-open:has(.event-thumb){
    display:grid;
    grid-template-columns:minmax(0,1fr) 82px;
    grid-template-rows:auto auto auto auto;
    column-gap:10px;
    align-items:center;
  }
  .mtl-shell .event-open:has(.event-thumb) .event-thumb{
    width:82px;height:72px;margin:0;border-radius:9px;
    grid-column:2;grid-row:1 / -1;align-self:center;
  }
  .mtl-shell .event-open:has(.event-thumb) .event-author,.mtl-shell .event-open:has(.event-thumb) time,.mtl-shell .event-open:has(.event-thumb) strong,.mtl-shell .event-open:has(.event-thumb) .event-summary{grid-column:1}
  .mtl-shell .event-open:has(.event-thumb) .event-author{grid-row:1;margin-bottom:2px}
  .mtl-shell .event-open:has(.event-thumb) time{grid-row:2}
  .mtl-shell .event-open:has(.event-thumb) strong{grid-row:3;margin:3px 0}
  .mtl-shell .event-open:has(.event-thumb) .event-summary{grid-row:4}
}

/* Inline event expansion */
.mtl-shell .event-card.expanded{z-index:12}
.mtl-shell .event-inline-detail{width:min(620px,calc(100vw - 48px));margin-top:10px;text-align:left;background:rgba(17,22,32,.88);border:1px solid color-mix(in srgb,var(--author-color) 42%,#ffffff18);border-radius:14px;box-shadow:0 22px 60px #0009;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);overflow:hidden;opacity:0;transform:translateY(-8px);transition:opacity .18s ease,transform .18s ease}
.mtl-shell .event-inline-detail.show{opacity:1;transform:none}.mtl-shell .event-inline-detail[hidden]{display:none!important}.mtl-shell .event-card.left .event-inline-detail{margin-left:auto}.mtl-shell .event-card.right .event-inline-detail{margin-right:auto}.mtl-shell .inline-detail-inner{padding:18px}.mtl-shell .inline-detail-inner>time{color:var(--author-color);font:12px ui-monospace,monospace}.mtl-shell .inline-detail-inner h2{margin:6px 0 10px;font-size:22px}.mtl-shell .inline-loading,.mtl-shell .inline-error{padding:18px;color:#aeb8c8}.mtl-shell .inline-error{color:#ff9ba5}.mtl-shell .event-card.expanded .event-open{border-color:var(--author-color)}

/* Save/upload progress overlay */
.mtl-shell .save-progress{position:fixed;inset:0;z-index:12000;display:grid;place-items:center;padding:22px;background:rgba(2,4,10,.72);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.mtl-shell .save-progress[hidden]{display:none}.mtl-shell .save-progress-card{width:min(430px,100%);padding:24px;border:1px solid #ffffff25;border-radius:18px;background:rgba(17,22,32,.94);box-shadow:0 30px 100px #000b}.mtl-shell .save-progress-card strong{font-size:18px}.mtl-shell .save-progress-card p{margin:8px 0 16px;color:#aeb8c8;min-height:20px}.mtl-shell .save-progress-track{height:10px;overflow:hidden;border-radius:999px;background:#ffffff12}.mtl-shell .save-progress-track i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#6e87ff,#9baaff);transition:width .18s ease}.mtl-shell .save-progress-track i.processing{animation:progressPulse .9s ease-in-out infinite alternate}.mtl-shell .save-progress-card>span{display:block;margin-top:8px;text-align:right;color:#aeb8c8;font:12px ui-monospace,monospace}@keyframes progressPulse{from{opacity:.55}to{opacity:1}}
@media (max-width:720px){.mtl-shell .event-inline-detail{width:100%;margin-left:0!important;margin-right:0!important}.mtl-shell .inline-detail-inner{padding:14px}.mtl-shell .inline-detail-inner h2{font-size:19px}}
/* Collaboration sidebar */
.mtl-shell .timeline-workspace{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:22px;align-items:start;max-width:1320px;margin:0 auto}.mtl-shell .timeline-workspace .timeline-stage{width:100%;min-width:0}.mtl-shell .timeline-live{position:sticky;top:18px;display:grid;gap:14px;transition:filter .25s ease}.mtl-shell .timeline-live>section{background:rgba(18,25,42,.78);border:1px solid rgba(255,255,255,.09);border-radius:14px;padding:14px;box-shadow:0 12px 35px rgba(0,0,0,.16);backdrop-filter:blur(12px)}.mtl-shell .timeline-live h2{font-size:14px;margin:0 0 10px}.mtl-shell .live-title{display:flex;align-items:center;justify-content:space-between}.mtl-shell .live-pulse{width:7px;height:7px;border-radius:50%;background:#41d17d;box-shadow:0 0 0 5px rgba(65,209,125,.1)}.mtl-shell .live-user,.mtl-shell .activity-item{display:flex;gap:9px;align-items:flex-start;padding:9px 0;border-top:1px solid rgba(255,255,255,.06)}.mtl-shell .live-user:first-child,.mtl-shell .activity-item:first-child{border-top:0}.mtl-shell .live-user>i,.mtl-shell .activity-item>i,.mtl-shell .participant-checks i{width:9px;height:9px;flex:0 0 9px;margin-top:5px;border-radius:50%;background:var(--live-color,var(--participant-color,#8aa4ff));box-shadow:0 0 0 3px color-mix(in srgb,var(--live-color,var(--participant-color,#8aa4ff)) 18%,transparent)}.mtl-shell .live-user span,.mtl-shell .activity-item span{min-width:0;flex:1}.mtl-shell .live-user b,.mtl-shell .activity-item b{font-size:12px}.mtl-shell .live-user small,.mtl-shell .activity-item small{display:block;font-size:10px;color:#8f9bb2;margin-top:2px}.mtl-shell .live-user em{font-style:normal;font-size:11px}.mtl-shell .live-user em.online{color:#41d17d}.mtl-shell .live-user em.offline{color:#667085}.mtl-shell .activity-item{font-size:11px;line-height:1.4}.mtl-shell .activity-item strong{font-weight:600}.mtl-shell .muted{font-size:11px;color:#8490a6}.mtl-shell .timeline-live.live-flash{filter:brightness(1.12)}
.mtl-shell .participant-editor{margin:12px 0 18px;padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:12px}.mtl-shell .participant-checks{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.mtl-shell .participant-checks label{display:flex;align-items:center;gap:6px;padding:6px 9px;border-radius:9px;background:rgba(255,255,255,.04);font-size:12px}.mtl-shell .participant-checks i{margin-top:0}
@media (max-width:980px){.mtl-shell .timeline-workspace{grid-template-columns:1fr}.mtl-shell .timeline-live{position:static;grid-template-columns:1fr 1fr;order:-1}.mtl-shell .timeline-live>section{min-width:0}}@media (max-width:620px){.mtl-shell .timeline-live{grid-template-columns:1fr}}
.mtl-shell n/* v9: landing metadata separation + centered timeline workspace */
.tl-tile{position:relative;display:block}
.mtl-shell .tl-tile-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.mtl-shell .tl-tile-head>strong{min-width:0}
.mtl-shell .tl-range{display:block;margin-top:9px;font:12px/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#8490a6!important}
.mtl-shell .tl-joined{flex:0 0 auto;padding:5px 9px;border:1px solid rgba(65,209,125,.28);border-radius:999px;background:rgba(65,209,125,.10);color:#65dfa0;font-size:11px;line-height:1;font-weight:700}

/* Keep the actual timeline centered on the viewport. The collaboration panel uses
   the otherwise empty right side instead of taking width away from the timeline. */
.mtl-shell .timeline-workspace{position:relative;display:block;max-width:none;width:100%;margin:0 auto}
.mtl-shell .timeline-workspace .timeline-stage{width:min(1040px,calc(100vw - 40px));margin-left:auto;margin-right:auto}
.mtl-shell .timeline-live{position:absolute;top:30px;right:max(18px,calc((100vw - 1600px)/2));width:240px;z-index:5}
@media (max-width:1320px){
  .mtl-shell .timeline-workspace{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:20px;padding:0 18px}
  .mtl-shell .timeline-workspace .timeline-stage{width:100%;margin-left:0;margin-right:0}
  .mtl-shell .timeline-live{position:sticky;top:78px;right:auto;width:auto}
}
@media (max-width:900px){
  .mtl-shell .timeline-workspace{display:flex;flex-direction:column;padding:0 14px}
  .mtl-shell .timeline-live{position:static;order:-1;width:100%}
  .mtl-shell .timeline-workspace .timeline-stage{width:100%;margin-left:0;margin-right:0}
}

/* v10: keep collaboration panels outside the right event-card lane */
@media (min-width:1660px){
  .mtl-shell .timeline-workspace{position:relative;display:block;max-width:none;width:100%;margin:0 auto;padding:0}
  .mtl-shell .timeline-workspace .timeline-stage{width:1040px;max-width:calc(100vw - 40px);margin-left:auto;margin-right:auto}
  .mtl-shell .timeline-live{
    position:absolute;
    top:30px;
    left:calc(50% + 548px);
    right:auto;
    width:240px;
    z-index:5;
  }
}

/* When there is not enough horizontal room, reserve a real sidebar column so
   the live panels never cover right-side timeline events. */
@media (min-width:901px) and (max-width:1659px){
  .mtl-shell .timeline-workspace{
    display:grid;
    grid-template-columns:minmax(620px,1040px) 240px;
    justify-content:center;
    align-items:start;
    gap:28px;
    padding:0 18px;
  }
  .mtl-shell .timeline-workspace .timeline-stage{width:100%;margin-left:0;margin-right:0}
  .mtl-shell .timeline-live{position:sticky;top:78px;left:auto;right:auto;width:240px}
}

/* v11: expanded details and add/edit form stay on their timeline side */
@media (min-width:721px){
  .mtl-shell .event-inline-detail{width:100%;max-width:100%;box-sizing:border-box}
  .mtl-shell .event-inline-detail .inline-detail-inner,.mtl-shell .event-inline-detail .rich-body,.mtl-shell .event-inline-detail .detail-section,.mtl-shell .event-inline-detail .og-card{max-width:100%;min-width:0}
  .mtl-shell .event-inline-detail img,.mtl-shell .event-inline-detail video,.mtl-shell .event-inline-detail iframe,.mtl-shell .event-inline-detail table{max-width:100%;height:auto}
  .mtl-shell .event-inline-detail .rich-body,.mtl-shell .event-inline-detail .lead,.mtl-shell .event-inline-detail .og-card span{overflow-wrap:anywhere;word-break:break-word}

  .mtl-shell #edit-dialog.timeline-side-dialog{
    position:fixed;
    top:50%;
    bottom:auto;
    width:min(480px,calc(50vw - 64px));
    max-width:calc(50vw - 64px);
    max-height:88vh;
    margin:0;
    transform:translateY(-50%);
  }
  .mtl-shell #edit-dialog.timeline-side-left{left:max(20px,calc(50% - 520px));right:auto}
  .mtl-shell #edit-dialog.timeline-side-right{right:max(20px,calc(50% - 520px));left:auto}
}
@media (max-width:720px){
  .mtl-shell #edit-dialog.timeline-side-dialog{width:min(780px,calc(100% - 28px));max-width:calc(100% - 28px);margin:auto;transform:none}
}

/* v12: add/edit events inline on the selected side of the timeline */
.mtl-shell .inline-event-editor{
  position:absolute;z-index:16;width:calc(50% - 34px);max-width:calc(50% - 34px);
  padding:18px;background:rgba(17,22,32,.96);border:1px solid #ffffff22;border-radius:16px;
  box-shadow:0 20px 55px #0008;cursor:default;text-align:left;
}
.mtl-shell .inline-event-editor[hidden]{display:none!important}
.mtl-shell .inline-event-editor.inline-left{left:0;right:auto}
.mtl-shell .inline-event-editor.inline-right{right:0;left:auto}
.mtl-shell .inline-event-editor h2{margin:0 0 12px;font-size:19px}
.mtl-shell .inline-event-editor label{margin:10px 0}
.mtl-shell .inline-event-editor input,.mtl-shell .inline-event-editor textarea{min-width:0}
.mtl-shell .inline-event-editor .upload-sections{grid-template-columns:1fr;gap:8px}
.mtl-shell .inline-event-editor .upload-box{margin:0;padding:10px;min-width:0;overflow:hidden}
.mtl-shell .inline-event-editor .upload-box input{max-width:100%}
.mtl-shell .inline-event-editor .ck.ck-editor{max-width:100%;min-width:0}
.mtl-shell .inline-event-editor .ck-editor__editable{min-height:180px;max-height:360px}
.mtl-shell .inline-event-editor .form-actions{position:sticky;bottom:0;padding-top:10px;background:linear-gradient(transparent,rgba(17,22,32,.98) 35%);flex-wrap:wrap}
.mtl-shell .inline-cancel{background:#343b49}
@media (max-width:720px){
  .mtl-shell .inline-event-editor,.mtl-shell .inline-event-editor.inline-left,.mtl-shell .inline-event-editor.inline-right{
    left:48px;right:auto;width:calc(100% - 48px);max-width:calc(100% - 48px);padding:14px
  }
}

/* v13: add/edit editor is a real timeline item inside the event lane */
@media (min-width:721px){
  .mtl-shell .timeline-stage>.inline-event-editor{
    width:calc(50% - 34px);
    max-width:calc(50% - 34px);
    min-width:0;
    margin:0;
    box-sizing:border-box;
  }
  .mtl-shell .timeline-stage>.inline-event-editor.inline-left{left:0;right:auto}
  .mtl-shell .timeline-stage>.inline-event-editor.inline-right{right:0;left:auto}
  .mtl-shell .timeline-stage>.inline-event-editor:before{
    content:"";position:absolute;top:31px;width:34px;height:3px;background:#6e87ff;
  }
  .mtl-shell .timeline-stage>.inline-event-editor:after{
    content:"";position:absolute;top:27px;width:10px;height:10px;border-radius:50%;
    background:#6e87ff;box-shadow:0 0 0 5px #0b0d12,0 0 0 8px #6e87ff;
  }
  .mtl-shell .timeline-stage>.inline-event-editor.inline-left:before{right:-34px}
  .mtl-shell .timeline-stage>.inline-event-editor.inline-left:after{right:-40px}
  .mtl-shell .timeline-stage>.inline-event-editor.inline-right:before{left:-34px}
  .mtl-shell .timeline-stage>.inline-event-editor.inline-right:after{left:-40px}
  .mtl-shell .inline-event-editor .upload-sections{grid-template-columns:repeat(3,minmax(0,1fr))}
  .mtl-shell .inline-event-editor .upload-box{font-size:11px}
  .mtl-shell .inline-event-editor .upload-box input{font-size:11px;padding:8px}
  .mtl-shell .inline-event-editor .ck-editor__editable{min-height:150px;max-height:320px}
}

/* v14: wider timeline workspace + cleaner inline editor */
@media (min-width:1660px){
  .mtl-shell .timeline-workspace .timeline-stage{width:1180px;max-width:calc(100vw - 360px)}
  .mtl-shell .timeline-live{left:calc(50% + 618px);width:230px}
}
@media (min-width:901px) and (max-width:1659px){
  .mtl-shell .timeline-workspace{
    grid-template-columns:minmax(760px,1180px) 220px;
    gap:24px;
    padding:0 22px;
  }
  .mtl-shell .timeline-live{width:220px}
}
@media (min-width:721px){
  .mtl-shell .event-open{width:min(500px,100%)}
  .mtl-shell .inline-event-editor{padding:16px;border-radius:15px}
  .mtl-shell .inline-event-editor h2{margin-bottom:10px}
  .mtl-shell .inline-event-editor label{margin:8px 0;gap:5px}
  .mtl-shell .inline-event-editor input,.mtl-shell .inline-event-editor textarea{padding:10px}
  .mtl-shell .inline-event-editor .ck-editor__editable{min-height:145px;max-height:300px}
  .mtl-shell .inline-event-editor .upload-sections{gap:7px}
  .mtl-shell .inline-event-editor .upload-box{padding:9px}
  .mtl-shell .inline-event-editor .form-actions{padding-top:8px}
}
.mtl-shell .timeline-live>section{padding:12px}
.mtl-shell .timeline-live h2{margin-bottom:8px}
.mtl-shell .activity-item,.mtl-shell .live-user{padding:8px 0}

/* v15: language selector */
.mtl-shell .mtl-language{display:inline-flex!important;align-items:center;gap:6px;margin:0!important;color:#aeb6c7;font-size:12px;font-weight:600}
.mtl-shell .mtl-language span{opacity:.8}
.mtl-shell .mtl-language select{appearance:auto;width:auto;min-width:112px;margin:0;padding:7px 28px 7px 9px;border:1px solid #ffffff1f;border-radius:9px;background:#151923;color:#eef2ff;font:inherit;cursor:pointer}
.mtl-shell .mtl-language select:focus{outline:2px solid #6e87ff66;outline-offset:1px}
@media (max-width:720px){.mtl-shell .mtl-language select{min-width:96px;padding:6px 22px 6px 7px}.mtl-shell .mtl-language span{display:none}}


/* v16: keep the timeline itself centered in the viewport; live panels sit outside it. */
@media (min-width:1200px) and (max-width:1659px){
  .mtl-shell .timeline-workspace{position:relative;display:block;width:100%;max-width:none;margin:0;padding:0}
  .mtl-shell .timeline-workspace .timeline-stage{
    width:min(1040px,calc(100vw - 600px));
    max-width:none;
    margin-left:auto;
    margin-right:auto;
  }
  .mtl-shell .timeline-live{
    position:absolute;
    top:30px;
    left:calc(50% + min(520px,calc((100vw - 600px)/2)) + 28px);
    right:auto;
    width:240px;
  }
}
@media (min-width:1660px){
  .mtl-shell .timeline-workspace .timeline-stage{margin-left:auto;margin-right:auto}
}

/* Separate sign-in / registration screens */
.mtl-shell .auth-page{max-width:520px;margin:0 auto;padding:64px 20px 90px}.mtl-shell .auth-switch{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px;padding:5px;border:1px solid #ffffff14;border-radius:14px;background:#10141d}.mtl-shell .auth-switch a{padding:11px 14px;border-radius:10px;text-align:center;text-decoration:none;color:#8f9aac;font-weight:800}.mtl-shell .auth-switch a.active{background:#232a3a;color:#fff;box-shadow:0 6px 20px #0004}.mtl-shell .auth-card{background:#131722;border:1px solid #ffffff16;border-radius:18px;padding:26px}.mtl-shell .auth-card h1{margin:0 0 20px}.mtl-shell .auth-card button{width:100%;margin-top:8px}.mtl-shell .auth-foot{margin:20px 0 0;text-align:center;color:#9da8ba}.mtl-shell .auth-foot a{color:#9db0ff;font-weight:800}.mtl-shell .auth-page>.error{margin-bottom:16px}@media (max-width:720px){.mtl-shell .auth-page{padding:38px 14px 70px}.mtl-shell .auth-card{padding:20px}}

/* v17: mobile-first timeline polish */
@media (max-width:720px){
  .mtl-shell html{overflow-x:hidden}
  .mtl-shell{font-size:14px;overflow-x:hidden;-webkit-text-size-adjust:100%}
  .mtl-shell header{
    position:sticky;top:0;z-index:50;min-height:54px;padding:9px 12px;gap:8px;
    align-items:center;background:rgba(11,13,18,.94);border-bottom-color:#ffffff14;
  }
  .mtl-shell header>a{flex:0 1 auto;min-width:0;max-width:38vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;font-weight:750}
  .mtl-shell header nav{min-width:0;margin-left:auto;gap:7px;justify-content:flex-end;flex-wrap:nowrap}
  .mtl-shell header nav>span{display:none}
  .mtl-shell header nav>a{padding:7px 8px;border:1px solid #ffffff14;border-radius:9px;background:#ffffff08;text-decoration:none;white-space:nowrap;font-size:11px}
  .mtl-shell .mtl-language{flex:0 0 auto!important}
  .mtl-shell .mtl-language select{min-width:82px;max-width:92px;height:32px;padding:5px 20px 5px 7px;font-size:11px}

  .mtl-shell .landing,.mtl-shell .admin-mtl{padding:28px 12px 60px}
  .mtl-shell .landing h1,.mtl-shell .admin-mtl h1{font-size:28px;line-height:1.12}
  .mtl-shell .timeline-list{grid-template-columns:1fr;gap:11px}
  .mtl-shell .tl-tile{padding:16px;border-radius:14px}
  .mtl-shell .tl-tile-head{gap:10px;align-items:flex-start}
  .mtl-shell .tl-tile-head>strong{font-size:16px;line-height:1.35}
  .mtl-shell .tl-range{font-size:10px}

  .mtl-shell .tl-hero{padding:28px 14px 14px;text-align:left}
  .mtl-shell .tl-hero .eyebrow{margin:0 0 6px;font-size:10px;letter-spacing:.16em}
  .mtl-shell .tl-hero h1{margin:0 0 8px;font-size:clamp(27px,8.5vw,38px);line-height:1.08;overflow-wrap:anywhere}
  .mtl-shell .tl-hero>p:not(.eyebrow):not(.hint){margin:8px 0;color:#aeb7c6;line-height:1.55}
  .mtl-shell .tl-hero .range{justify-content:flex-start;gap:6px 9px;font-size:11px}
  .mtl-shell .tl-hero .hint{margin:12px 0 0;padding:9px 11px;border:1px solid #ffffff12;border-radius:10px;background:#ffffff06;font-size:11px;line-height:1.45}

  .mtl-shell .timeline-workspace{display:flex!important;flex-direction:column!important;width:100%!important;padding:0 10px!important;gap:12px!important}
  .mtl-shell .timeline-live{
    position:static!important;order:-1!important;width:100%!important;display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px!important;margin:0!important;
  }
  .mtl-shell .timeline-live>section{padding:10px!important;border-radius:12px;max-height:154px;overflow:auto;overscroll-behavior:contain}
  .mtl-shell .timeline-live h2{font-size:12px;margin-bottom:5px}
  .mtl-shell .live-user,.mtl-shell .activity-item{padding:6px 0;gap:7px}
  .mtl-shell .live-user b,.mtl-shell .activity-item b{font-size:11px}
  .mtl-shell .live-user small,.mtl-shell .activity-item small{font-size:9px}
  .mtl-shell .live-user em{font-size:9px}

  .mtl-shell .timeline-workspace .timeline-stage{
    width:100%!important;max-width:none!important;margin:8px 0 70px!important;padding:0!important;
    min-width:0;cursor:default;
  }
  .mtl-shell .timeline-stage .axis{left:15px;width:4px;margin-left:0;box-shadow:0 0 12px #ff31313d}
  .mtl-shell .timeline-stage .axis:after{width:16px;height:16px;border-width:4px;bottom:-12px}
  .mtl-shell .axis-hover{display:none!important}

  .mtl-shell .event-card,.mtl-shell .event-card.left,.mtl-shell .event-card.right{
    left:42px!important;right:auto!important;width:calc(100% - 42px)!important;max-width:none!important;text-align:left!important;
  }
  .mtl-shell .event-card:before,.mtl-shell .event-card.left:before,.mtl-shell .event-card.right:before{left:-27px!important;right:auto!important;width:27px!important;top:27px}
  .mtl-shell .event-card:after,.mtl-shell .event-card.left:after,.mtl-shell .event-card.right:after{left:-32px!important;right:auto!important;top:23px;width:9px;height:9px}
  .mtl-shell .event-open,.mtl-shell .left .event-open{
    width:100%!important;max-width:none;margin:0!important;padding:12px;border-radius:13px;
    box-shadow:0 9px 26px #0004;text-align:left!important;touch-action:manipulation;
  }
  .mtl-shell .event-open:hover{transform:none}
  .mtl-shell .event-open time{font-size:10px}
  .mtl-shell .event-open strong{font-size:15px;line-height:1.3;margin:4px 0}
  .mtl-shell .event-summary{font-size:12px;line-height:1.4;-webkit-line-clamp:2}
  .mtl-shell .event-author{justify-content:flex-start!important;margin-bottom:4px;font-size:10px!important}
  .mtl-shell .event-open:has(.event-thumb){grid-template-columns:minmax(0,1fr) 74px!important;column-gap:10px!important}
  .mtl-shell .event-open:has(.event-thumb) .event-thumb{width:74px!important;height:66px!important;border-radius:8px!important}

  .mtl-shell .event-inline-detail{width:100%!important;max-width:100%!important;margin:7px 0 0!important;border-radius:12px}
  .mtl-shell .inline-detail-inner{padding:13px!important}
  .mtl-shell .inline-detail-inner h2{font-size:18px!important;line-height:1.25}
  .mtl-shell .inline-detail-inner .lead{font-size:14px;line-height:1.55}
  .mtl-shell .rich-body{line-height:1.65;overflow-wrap:anywhere}
  .mtl-shell .rich-body img,.mtl-shell .event-inline-detail video,.mtl-shell .event-inline-detail iframe,.mtl-shell .event-inline-detail table{max-width:100%!important;height:auto}
  .mtl-shell .detail-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .mtl-shell .og-card{gap:8px;padding:8px}
  .mtl-shell .og-card>img{width:82px;height:68px}

  .mtl-shell .inline-event-editor,.mtl-shell .inline-event-editor.inline-left,.mtl-shell .inline-event-editor.inline-right,.mtl-shell .timeline-stage>.inline-event-editor{
    left:42px!important;right:auto!important;width:calc(100% - 42px)!important;max-width:calc(100% - 42px)!important;
    padding:12px!important;border-radius:13px!important;box-shadow:0 16px 45px #0009;
  }
  .mtl-shell .inline-event-editor h2{font-size:17px;margin-bottom:8px}
  .mtl-shell .inline-event-editor label{margin:8px 0;gap:5px;font-size:12px}
  .mtl-shell .inline-event-editor input,.mtl-shell .inline-event-editor textarea,.mtl-shell .inline-event-editor select{font-size:16px;padding:10px}
  .mtl-shell .inline-event-editor .ck.ck-editor{width:100%;min-width:0}
  .mtl-shell .inline-event-editor .ck-editor__editable{min-height:150px;max-height:42vh;font-size:16px}
  .mtl-shell .inline-event-editor .upload-sections{display:grid;grid-template-columns:1fr!important;gap:6px!important}
  .mtl-shell .inline-event-editor .upload-box{padding:9px!important}
  .mtl-shell .inline-event-editor .upload-box input{font-size:12px;padding:8px}
  .mtl-shell .inline-event-editor .form-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;bottom:-1px;margin:0 -4px -4px;padding:16px 4px 4px}
  .mtl-shell .inline-event-editor .form-actions .danger{grid-column:1/-1}
  .mtl-shell .inline-event-editor .form-actions button{min-height:42px}

  .mtl-shell .save-progress{padding:14px}
  .mtl-shell .save-progress-card{padding:18px;border-radius:15px}
  .mtl-shell .save-progress-card strong{font-size:16px}

  .mtl-shell .auth-page{padding:28px 12px 60px}
  .mtl-shell .auth-card{padding:17px;border-radius:14px}
  .mtl-shell .auth-card h1{font-size:24px;margin-bottom:14px}
  .mtl-shell .auth-switch{border-radius:12px}
  .mtl-shell .auth-switch a{padding:9px 8px;font-size:12px}
  .mtl-shell .auth-card input,.mtl-shell .auth-card textarea,.mtl-shell .auth-card select{font-size:16px}

  .mtl-shell .admin-mtl section{padding:15px;border-radius:14px}
  .mtl-shell .admin-row{gap:9px;padding:11px 0}
  .mtl-shell .inline{display:flex;width:100%;flex-wrap:wrap}
  .mtl-shell .inline>*{min-width:0;flex:1}
}

@media (max-width:420px){
  .mtl-shell header{padding-left:9px;padding-right:9px}
  .mtl-shell header>a{max-width:30vw;font-size:12px}
  .mtl-shell header nav{gap:5px}
  .mtl-shell header nav>a{padding:6px;font-size:10px}
  .mtl-shell .mtl-language select{min-width:72px;max-width:78px}
  .mtl-shell .timeline-live{grid-template-columns:1fr!important}
  .mtl-shell .timeline-live>section{max-height:128px}
  .mtl-shell .tl-hero{padding-left:11px;padding-right:11px}
  .mtl-shell .timeline-workspace{padding:0 7px!important}
  .mtl-shell .event-card,.mtl-shell .event-card.left,.mtl-shell .event-card.right{left:38px!important;width:calc(100% - 38px)!important}
  .mtl-shell .inline-event-editor,.mtl-shell .inline-event-editor.inline-left,.mtl-shell .inline-event-editor.inline-right,.mtl-shell .timeline-stage>.inline-event-editor{left:38px!important;width:calc(100% - 38px)!important;max-width:calc(100% - 38px)!important}
  .mtl-shell .event-open:has(.event-thumb){grid-template-columns:minmax(0,1fr) 66px!important}
  .mtl-shell .event-open:has(.event-thumb) .event-thumb{width:66px!important;height:60px!important}
}

/* v18: unknown event time control */
.mtl-shell .time-unknown-toggle{display:flex!important;grid-template-columns:none!important;align-items:center;gap:10px;margin-top:-4px;padding:10px 12px;border:1px solid #ffffff18;border-radius:10px;background:#ffffff06;cursor:pointer}.mtl-shell .time-unknown-toggle>input{width:18px!important;height:18px!important;margin:0;flex:0 0 18px}.mtl-shell .time-unknown-toggle>span{display:grid;gap:2px}.mtl-shell .time-unknown-toggle strong{color:#eef1f6;font-size:13px}.mtl-shell .time-unknown-toggle small{font-size:11px;color:#8f9bb2}

/* v21: reserve a hard gutter between the right timeline lane and live sidebar. */
@media (min-width:1660px){
  .mtl-shell .timeline-workspace{overflow:visible}
  .mtl-shell .timeline-workspace .timeline-stage{
    width:1080px!important;
    max-width:calc(100vw - 520px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .mtl-shell .timeline-live{
    left:calc(50% + 568px)!important;
    right:auto!important;
    width:230px!important;
  }
  .mtl-shell .event-card,.mtl-shell .event-card.left,.mtl-shell .event-card.right{
    max-width:calc(50% - 34px)!important;
    min-width:0!important;
  }
  .mtl-shell .event-card.right{right:0!important;left:auto!important}
  .mtl-shell .event-card.left{left:0!important;right:auto!important}
  .mtl-shell .event-open,.mtl-shell .event-inline-detail,.mtl-shell .inline-detail-inner,.mtl-shell .rich-body{
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  .mtl-shell .event-inline-detail{width:100%!important;overflow:hidden!important}
  .mtl-shell .rich-body{overflow-wrap:anywhere;word-break:break-word}
  .mtl-shell .rich-body img,.mtl-shell .rich-body video,.mtl-shell .rich-body iframe,.mtl-shell .rich-body table,.mtl-shell .event-inline-detail img,.mtl-shell .event-inline-detail video,.mtl-shell .event-inline-detail iframe,.mtl-shell .event-inline-detail table{
    max-width:100%!important;
    height:auto;
  }
}

.mtl-shell .event-view-count{display:inline-flex;align-items:center;gap:4px;margin-top:8px;font-size:12px;line-height:1;color:var(--muted,#8b93a7);font-weight:500}.mtl-shell .event-view-count b{font:inherit;color:inherit}

/* Infinite timeline loading */
.mtl-shell .timeline-load-sentinel{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:1px;
  pointer-events:none;
  display:flex;
  align-items:center;
  justify-content:center;
}
.mtl-shell .timeline-load-spinner{
  width:18px;
  height:18px;
  border:2px solid rgba(255,255,255,.16);
  border-top-color:currentColor;
  border-radius:50%;
  animation:mtl-load-spin .7s linear infinite;
}
@keyframes mtl-load-spin{to{transform:rotate(360deg)}}


/* v35: CKEditor must stay inside the inline timeline editor. */
.mtl-shell .inline-event-editor{
  box-sizing:border-box;
  min-width:0!important;
  max-width:calc(50% - 34px)!important;
  overflow:hidden;
}
.mtl-shell .inline-event-editor form,.mtl-shell .inline-event-editor label,.mtl-shell .inline-event-editor .editor-shell,.mtl-shell .inline-event-editor .ck-editor,.mtl-shell .inline-event-editor .ck-editor__main,.mtl-shell .inline-event-editor .ck-editor__editable,.mtl-shell .inline-event-editor .ck-toolbar{
  box-sizing:border-box;
  min-width:0!important;
  width:100%!important;
  max-width:100%!important;
}
.mtl-shell .inline-event-editor .ck-toolbar{
  overflow:hidden;
}
.mtl-shell .inline-event-editor .ck.ck-toolbar{
  flex-wrap:wrap;
}
.mtl-shell .inline-event-editor .ck-editor__editable{
  overflow:auto!important;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.mtl-shell .inline-event-editor .ck-content img,.mtl-shell .inline-event-editor .ck-content figure.image,.mtl-shell .inline-event-editor .ck-content table,.mtl-shell .inline-event-editor .ck-content .table{
  max-width:100%!important;
  height:auto;
}
.mtl-shell .inline-event-editor .ck-content figure.image img{
  max-width:100%!important;
  height:auto!important;
}
.mtl-shell .inline-event-editor .ck-content table{
  display:block;
  overflow-x:auto;
}
.mtl-shell .inline-event-editor .ck-content td,.mtl-shell .inline-event-editor .ck-content th{
  overflow-wrap:anywhere;
  word-break:break-word;
}
@media (max-width:720px){
  .mtl-shell .inline-event-editor,.mtl-shell .inline-event-editor.inline-left,.mtl-shell .inline-event-editor.inline-right,.mtl-shell .timeline-stage>.inline-event-editor{
    width:calc(100% - 38px)!important;
    max-width:calc(100% - 38px)!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  .mtl-shell .inline-event-editor .ck-toolbar{
    max-height:none!important;
  }
}

.mtl-shell{background:#0b0d12;color:#eef1f6;font-family:Inter,system-ui,-apple-system,sans-serif;min-height:calc(100vh - 100px)}
.mtl-shell main{max-width:1180px;margin:auto}

/* v36: mytimeline.run compatibility — do not inherit the legacy app.css editor height cap. */
.mtl-shell .timeline-stage > .inline-event-editor,
.mtl-shell .inline-event-editor,
.mtl-shell .inline-event-editor.inline-left,
.mtl-shell .inline-event-editor.inline-right {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
.mtl-shell .inline-event-editor > form {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
/* Keep only the rich-text editing surface scrollable, as in MTL; the whole form must remain visible. */
.mtl-shell .inline-event-editor .ck-editor__editable {
  overflow-y: auto !important;
}
.mtl-shell .inline-event-editor .form-actions {
  position: static !important;
  bottom: auto !important;
  margin-top: 10px !important;
  background: none !important;
}

/* v37: editing an existing event is subordinate to its card, not a new timeline node. */
.mtl-shell .timeline-stage > .inline-event-editor.is-editing-event::before,
.mtl-shell .timeline-stage > .inline-event-editor.is-editing-event::after {
  content: none !important;
  display: none !important;
}
